genesis: Update power state construction

This commit is contained in:
Łukasz Magiera 2020-04-13 22:41:05 +02:00
parent ff5494af4e
commit 2db9c24817

View File

@ -2,7 +2,6 @@ package genesis
import (
"context"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/specs-actors/actors/abi/big"
@ -24,10 +23,12 @@ func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error) {
}
sms := &power.State{
TotalRawBytePower: big.NewInt(0),
TotalQualityAdjPower: big.NewInt(1), // TODO: has to be 1 initially to avoid div by zero. Kinda annoying, should find a way to fix
TotalPledgeCollateral: big.NewInt(0),
MinerCount: 0,
EscrowTable: emptyhamt,
CronEventQueue: emptyhamt,
LastEpochTick: 0,
PoStDetectedFaultMiners: emptyhamt,
Claims: emptyhamt,
NumMinersMeetingMinPower: 0,