rpc: update RPC server invoke* calls

part of #1036
This commit is contained in:
Anna Shaleva 2020-06-10 14:45:55 +03:00
parent 3549515fd7
commit d5355acfa9
9 changed files with 229 additions and 11 deletions

View file

@ -1245,8 +1245,8 @@ func (bc *Blockchain) GetScriptHashesForVerifying(t *transaction.Transaction) ([
}
// GetTestVM returns a VM and a Store setup for a test run of some sort of code.
func (bc *Blockchain) GetTestVM() *vm.VM {
systemInterop := bc.newInteropContext(trigger.Application, bc.dao, nil, nil)
func (bc *Blockchain) GetTestVM(tx *transaction.Transaction) *vm.VM {
systemInterop := bc.newInteropContext(trigger.Application, bc.dao, nil, tx)
vm := SpawnVM(systemInterop)
vm.SetPriceGetter(getPrice)
return vm