diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index e95583ba0..f40c3e114 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1382,6 +1382,7 @@ func (bc *Blockchain) GetTestVM() (*vm.VM, storage.Store) { tmpStore := storage.NewMemCachedStore(bc.dao.store) systemInterop := bc.newInteropContext(trigger.Application, tmpStore, nil, nil) vm := bc.spawnVMWithInterops(systemInterop) + vm.SetPriceGetter(getPrice) return vm, tmpStore } diff --git a/pkg/rpc/server.go b/pkg/rpc/server.go index 3bc5cd451..9c0e3b86f 100644 --- a/pkg/rpc/server.go +++ b/pkg/rpc/server.go @@ -400,7 +400,7 @@ func (s *Server) runScriptInVM(script []byte) *wrappers.InvokeResult { _ = vm.Run() result := &wrappers.InvokeResult{ State: vm.State(), - GasConsumed: "0.1", + GasConsumed: vm.GasConsumed().String(), Script: hex.EncodeToString(script), Stack: vm.Estack(), }