Commit graph

5 commits

Author SHA1 Message Date
Tzu-Jung Lee
8e1ae77aad cleanup: bring the merkletrie in as trie. 2018-07-09 10:48:33 -07:00
Tzu-Jung Lee
ed4478bc72 cleanup: reorg the code for dependencies.
Move self-contained pieces into their own package.
This spells out the depedencies and the context each
sub-package focuses on.

Not the final structure as it's WIP.
Just tying the knots while climbing up the rope.
2018-07-09 10:48:33 -07:00
Tzu-Jung Lee
fa2e276f3d fix Bidding logics, and port some tests cases from lbrycrd 2018-07-08 22:12:57 -07:00
Tzu-Jung Lee
84c64c1018 wip: misc updates
AddClaim / AddSupport is working with minimal testing done so far.
RemoveClaim / RemoveSupport is implemented, but not tested yet.

Some known issues:

Currently, we update the BestClaim for each node in a lazy fashion.
Each node could add/remove claims/supports without recalculating hash
until its being obeserved externally.

However, due to the "Takeover Delay" bidding rule, as the block number
increases, the bestClaim might changes implicitly. The Trie can't detect
this passively, and would need some mechanism for this.
2018-07-03 22:03:55 -07:00
Tzu-Jung Lee
8eae587539 initial import 2018-07-03 14:56:10 -07:00