rpc: return amount of consumed GAS in invoke*
This commit is contained in:
parent
2f865480d3
commit
4718375db1
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue