From 5402e654d13991acfa5f4e4e863028cde7e4202a Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 18 Feb 2022 13:18:00 +0300 Subject: [PATCH] core: don't create useless DAO layer in GetTestVM We're already wrapping in interop.NewContext. --- pkg/core/blockchain.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 9d127721f..00690e6be 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -2140,8 +2140,7 @@ func (bc *Blockchain) GetEnrollments() ([]state.Validator, error) { // GetTestVM returns an interop context with VM set up for a test run. func (bc *Blockchain) GetTestVM(t trigger.Type, tx *transaction.Transaction, b *block.Block) *interop.Context { - d := bc.dao.GetPrivate() - systemInterop := bc.newInteropContext(t, d, b, tx) + systemInterop := bc.newInteropContext(t, bc.dao, b, tx) vm := systemInterop.SpawnVM() vm.SetPriceGetter(systemInterop.GetPrice) vm.LoadToken = contract.LoadToken(systemInterop)