feat: supply: drop genesis market locked funds
This commit is contained in:
parent
06294351fa
commit
24381411f2
@ -130,8 +130,7 @@ type StateManager struct {
|
|||||||
postIgnitionVesting []msig0.State
|
postIgnitionVesting []msig0.State
|
||||||
postCalicoVesting []msig0.State
|
postCalicoVesting []msig0.State
|
||||||
|
|
||||||
genesisPledge abi.TokenAmount
|
genesisPledge abi.TokenAmount
|
||||||
genesisMarketFunds abi.TokenAmount
|
|
||||||
|
|
||||||
tsExec Executor
|
tsExec Executor
|
||||||
tsExecMonitor ExecMonitor
|
tsExecMonitor ExecMonitor
|
||||||
|
@ -51,17 +51,11 @@ func (sm *StateManager) setupGenesisVestingSchedule(ctx context.Context) error {
|
|||||||
return xerrors.Errorf("loading state tree: %w", err)
|
return xerrors.Errorf("loading state tree: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
gmf, err := getFilMarketLocked(ctx, sTree)
|
|
||||||
if err != nil {
|
|
||||||
return xerrors.Errorf("setting up genesis market funds: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
gp, err := getFilPowerLocked(ctx, sTree)
|
gp, err := getFilPowerLocked(ctx, sTree)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("setting up genesis pledge: %w", err)
|
return xerrors.Errorf("setting up genesis pledge: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
sm.genesisMarketFunds = gmf
|
|
||||||
sm.genesisPledge = gp
|
sm.genesisPledge = gp
|
||||||
|
|
||||||
totalsByEpoch := make(map[abi.ChainEpoch]abi.TokenAmount)
|
totalsByEpoch := make(map[abi.ChainEpoch]abi.TokenAmount)
|
||||||
@ -202,7 +196,7 @@ func (sm *StateManager) GetFilVested(ctx context.Context, height abi.ChainEpoch)
|
|||||||
defer sm.genesisMsigLk.Unlock()
|
defer sm.genesisMsigLk.Unlock()
|
||||||
|
|
||||||
// TODO: combine all this?
|
// TODO: combine all this?
|
||||||
if sm.preIgnitionVesting == nil || sm.genesisPledge.IsZero() || sm.genesisMarketFunds.IsZero() {
|
if sm.preIgnitionVesting == nil || sm.genesisPledge.IsZero() {
|
||||||
err := sm.setupGenesisVestingSchedule(ctx)
|
err := sm.setupGenesisVestingSchedule(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return vf, xerrors.Errorf("failed to setup pre-ignition vesting schedule: %w", err)
|
return vf, xerrors.Errorf("failed to setup pre-ignition vesting schedule: %w", err)
|
||||||
@ -246,8 +240,6 @@ func (sm *StateManager) GetFilVested(ctx context.Context, height abi.ChainEpoch)
|
|||||||
if height <= build.UpgradeAssemblyHeight {
|
if height <= build.UpgradeAssemblyHeight {
|
||||||
// continue to use preIgnitionGenInfos, nothing changed at the Ignition epoch
|
// continue to use preIgnitionGenInfos, nothing changed at the Ignition epoch
|
||||||
vf = big.Add(vf, sm.genesisPledge)
|
vf = big.Add(vf, sm.genesisPledge)
|
||||||
// continue to use preIgnitionGenInfos, nothing changed at the Ignition epoch
|
|
||||||
vf = big.Add(vf, sm.genesisMarketFunds)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return vf, nil
|
return vf, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user