lotus/chain
Steven Li 0aa56ba665
Refactor the PowerCmp function
Why we have this: 
This algorithm here directly follow the rule of ratio to win, and easier to understand. 
Just think about a smaller space, e.g. 100, instead of 2^256. 

When one miner has 10% power, it should have 10% ratio to win. that is, when the h is in {0..9}, it wins. Simply speaking, it is: 
     (h + 1) / 100 <= 10% ,  instead of     
     h / 99 < 10%     
The former is easier to understand, though both are equivalent when h is an integer and power_ratio < 1)
2019-10-31 13:36:33 +08:00
..
actors deals: Nicer output in client cli 2019-10-29 13:02:13 +01:00
address Cleanup imports after rename 2019-10-18 13:47:41 +09:00
deals deals: gofmt 2019-10-29 13:02:24 +01:00
events events: always call revert in CahinAt 2019-10-21 09:54:36 +02:00
gen Set e=3 2019-10-28 19:22:40 +01:00
metrics Cleanup imports after rename 2019-10-18 13:47:41 +09:00
state on chain deals: Wip porting deal systems to storagemarket 2019-10-23 12:44:00 +02:00
stmgr Merge pull request #485 from lanzafame/feat/connect-chain-sync-trace 2019-10-30 10:57:09 -07:00
store Merge pull request #415 from filecoin-project/feat/deals-on-chain 2019-10-25 17:03:25 +02:00
sub Cleanup imports after rename 2019-10-18 13:47:41 +09:00
types Refactor the PowerCmp function 2019-10-31 13:36:33 +08:00
vm deals: Price per epoch 2019-10-29 11:01:18 +01:00
wallet handle changing default address 2019-10-18 20:42:00 +09:00
badtscache.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00
blocksync.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00
cbor_gen.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00
messagepool.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00
sync_test.go peer manager: Disable in tests 2019-10-23 13:02:00 +02:00
sync.go Set proving params matching the spec more closely 2019-10-28 17:51:45 +01:00
syncstate.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00
types_test.go Cleanup imports after rename 2019-10-18 13:47:41 +09:00