Fix circsuypply calc around null blocks
This commit is contained in:
parent
bfbd01ab15
commit
832e204ec4
@ -169,7 +169,10 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vmi.SetBlockHeight(i + 1)
|
if err = vmi.SetBlockHeight(ctx, i+1); err != nil {
|
||||||
|
return cid.Undef, cid.Undef, xerrors.Errorf("error advancing vm an epoch: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
pstate = newState
|
pstate = newState
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -827,8 +827,15 @@ func (vm *VM) StateTree() types.StateTree {
|
|||||||
return vm.cstate
|
return vm.cstate
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vm *VM) SetBlockHeight(h abi.ChainEpoch) {
|
func (vm *VM) SetBlockHeight(ctx context.Context, h abi.ChainEpoch) error {
|
||||||
vm.blockHeight = h
|
vm.blockHeight = h
|
||||||
|
ncirc, err := vm.circSupplyCalc(ctx, vm.blockHeight, vm.cstate)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.baseCircSupply = ncirc
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vm *VM) Invoke(act *types.Actor, rt *Runtime, method abi.MethodNum, params []byte) ([]byte, aerrors.ActorError) {
|
func (vm *VM) Invoke(act *types.Actor, rt *Runtime, method abi.MethodNum, params []byte) ([]byte, aerrors.ActorError) {
|
||||||
|
Loading…
Reference in New Issue
Block a user