core: don't create useless DAO layer in GetTestVM

We're already wrapping in interop.NewContext.
This commit is contained in:
Roman Khimov 2022-02-18 13:18:00 +03:00
parent b60d4ff191
commit 5402e654d1

View file

@ -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)