pass only fil-vested into FVM

This commit is contained in:
Steven Allen 2022-02-08 15:26:20 -08:00
parent 32b3618c74
commit e8d771fcac
3 changed files with 4 additions and 5 deletions

View File

@ -102,7 +102,6 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
if err != nil {
return nil, err
}
circulating := big.Add(supply.FilMined, supply.FilVested)
vmopt := &vm.VMOpts{
StateBase: base,
@ -112,7 +111,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
Actors: NewActorRegistry(),
Syscalls: sm.Syscalls,
CircSupplyCalc: sm.GetVMCirculatingSupply,
BaseCircSupply: circulating,
FilVested: supply.FilVested,
NetworkVersion: sm.GetNetworkVersion(ctx, e),
BaseFee: baseFee,
LookbackState: stmgr.LookbackStateGetterForTipset(sm, ts),

View File

@ -36,7 +36,7 @@ type FVM struct {
func NewFVM(ctx context.Context, opts *VMOpts) (*FVM, error) {
fvm, err := ffi.CreateFVM(0,
&FvmExtern{Rand: opts.Rand, Blockstore: opts.Bstore},
opts.Epoch, opts.BaseFee, opts.BaseCircSupply, opts.NetworkVersion, opts.StateBase,
opts.Epoch, opts.BaseFee, opts.FilVested, opts.NetworkVersion, opts.StateBase,
)
if err != nil {
return nil, err

View File

@ -227,8 +227,8 @@ type VMOpts struct {
Actors *ActorRegistry
Syscalls SyscallBuilder
CircSupplyCalc CircSupplyCalculator
// Amount of FIL vested & mined.
BaseCircSupply abi.TokenAmount
// Amount of FIL vested from genesis actors.
FilVested abi.TokenAmount
NetworkVersion network.Version
BaseFee abi.TokenAmount
LookbackState LookbackStateGetter