fix(lotus-sim): skip miners without power when loading

This commit is contained in:
Steven Allen 2021-06-08 15:20:52 -07:00
parent ba65a1ba9b
commit 747b3d3e57

View File

@ -32,6 +32,10 @@ func (sim *Simulation) loadClaims(ctx context.Context, height abi.ChainEpoch) (m
return nil, err
}
err = powerState.ForEachClaim(func(miner address.Address, claim power.Claim) error {
// skip miners without power
if claim.RawBytePower.IsZero() {
return nil
}
powerTable[miner] = claim
return nil
})