Skip to content

Commit 88d51d1

Browse files
committed
Update derived data invalidator test to use vm.RunV2
1 parent 7accaea commit 88d51d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fvm/environment/derived_data_invalidator_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,21 +242,22 @@ func TestMeterParamOverridesUpdated(t *testing.T) {
242242
memKind: memWeight,
243243
}
244244

245-
baseView := delta.NewDeltaView(nil)
245+
snapshotTree := storage.NewSnapshotTree(nil)
246+
246247
ctx := fvm.NewContext(fvm.WithChain(flow.Testnet.Chain()))
247248

248249
vm := fvm.NewVirtualMachine()
249-
err := vm.Run(
250+
executionSnapshot, _, err := vm.RunV2(
250251
ctx,
251252
fvm.Bootstrap(
252253
unittest.ServiceAccountPublicKey,
253254
fvm.WithExecutionMemoryLimit(memoryLimit),
254255
fvm.WithExecutionEffortWeights(computationWeights),
255256
fvm.WithExecutionMemoryWeights(memoryWeights)),
256-
baseView)
257+
snapshotTree)
257258
require.NoError(t, err)
258259

259-
view := baseView.NewChild()
260+
view := delta.NewDeltaView(snapshotTree.Append(executionSnapshot))
260261
nestedTxn := state.NewTransactionState(view, state.DefaultParameters())
261262

262263
derivedBlockData := derived.NewEmptyDerivedBlockData()

0 commit comments

Comments
 (0)