Merge pull request #948 from filecoin-project/feat/sybill-fun

Basic sybill resistance mechanisms
This commit is contained in:
Whyrusleeping
2019-12-17 20:45:45 +01:00
committed by GitHub
13 changed files with 137 additions and 52 deletions
+1 -12
View File
@@ -223,18 +223,7 @@ func (a *StateAPI) StateGetReceipt(ctx context.Context, msg cid.Cid, ts *types.T
}
func (a *StateAPI) StateListMiners(ctx context.Context, ts *types.TipSet) ([]address.Address, error) {
var state actors.StoragePowerState
if _, err := a.StateManager.LoadActorState(ctx, actors.StoragePowerAddress, &state, ts); err != nil {
return nil, err
}
cst := hamt.CSTFromBstore(a.StateManager.ChainStore().Blockstore())
miners, err := actors.MinerSetList(ctx, cst, state.Miners)
if err != nil {
return nil, err
}
return miners, nil
return stmgr.ListMinerActors(ctx, a.StateManager, ts)
}
func (a *StateAPI) StateListActors(ctx context.Context, ts *types.TipSet) ([]address.Address, error) {