Merge pull request #3996 from filecoin-project/conformance-ntwork-upgrade-adjustments
small adjustments following network upgradability changes
This commit is contained in:
commit
6ca5308c82
@ -395,6 +395,11 @@ func (st *StateTree) ForEach(f func(address.Address, *types.Actor) error) error
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Version returns the version of the StateTree data structure in use.
|
||||||
|
func (st *StateTree) Version() builtin.Version {
|
||||||
|
return st.version
|
||||||
|
}
|
||||||
|
|
||||||
func Diff(oldTree, newTree *StateTree) (map[string]types.Actor, error) {
|
func Diff(oldTree, newTree *StateTree) (map[string]types.Actor, error) {
|
||||||
out := map[string]types.Actor{}
|
out := map[string]types.Actor{}
|
||||||
|
|
||||||
|
@ -122,6 +122,8 @@ func (d *Driver) ExecuteTipset(bs blockstore.Blockstore, ds ds.Batching, preroot
|
|||||||
|
|
||||||
// ExecuteMessage executes a conformance test vector message in a temporary VM.
|
// ExecuteMessage executes a conformance test vector message in a temporary VM.
|
||||||
func (d *Driver) ExecuteMessage(bs blockstore.Blockstore, preroot cid.Cid, epoch abi.ChainEpoch, msg *types.Message) (*vm.ApplyRet, cid.Cid, error) {
|
func (d *Driver) ExecuteMessage(bs blockstore.Blockstore, preroot cid.Cid, epoch abi.ChainEpoch, msg *types.Message) (*vm.ApplyRet, cid.Cid, error) {
|
||||||
|
// dummy state manager; only to reference the GetNetworkVersion method, which does not depend on state.
|
||||||
|
sm := new(stmgr.StateManager)
|
||||||
vmOpts := &vm.VMOpts{
|
vmOpts := &vm.VMOpts{
|
||||||
StateBase: preroot,
|
StateBase: preroot,
|
||||||
Epoch: epoch,
|
Epoch: epoch,
|
||||||
@ -130,6 +132,7 @@ func (d *Driver) ExecuteMessage(bs blockstore.Blockstore, preroot cid.Cid, epoch
|
|||||||
Syscalls: mkFakedSigSyscalls(vm.Syscalls(ffiwrapper.ProofVerifier)), // TODO always succeeds; need more flexibility.
|
Syscalls: mkFakedSigSyscalls(vm.Syscalls(ffiwrapper.ProofVerifier)), // TODO always succeeds; need more flexibility.
|
||||||
CircSupplyCalc: nil,
|
CircSupplyCalc: nil,
|
||||||
BaseFee: BaseFee,
|
BaseFee: BaseFee,
|
||||||
|
NtwkVersion: sm.GetNtwkVersion,
|
||||||
}
|
}
|
||||||
|
|
||||||
lvm, err := vm.NewVM(context.TODO(), vmOpts)
|
lvm, err := vm.NewVM(context.TODO(), vmOpts)
|
||||||
|
Loading…
Reference in New Issue
Block a user