core: allow to provide block in GetTestVM()
Sometimes amount of GAS consumed depends on block height.
This commit is contained in:
parent
42ae226f9e
commit
a5914f89fa
5 changed files with 6 additions and 6 deletions
|
@ -1127,7 +1127,7 @@ func (s *Server) invokescript(reqParams request.Params) (interface{}, *response.
|
|||
// runScriptInVM runs given script in a new test VM and returns the invocation
|
||||
// result.
|
||||
func (s *Server) runScriptInVM(script []byte, tx *transaction.Transaction) *result.Invoke {
|
||||
vm := s.chain.GetTestVM(tx)
|
||||
vm := s.chain.GetTestVM(tx, nil)
|
||||
vm.GasLimit = int64(s.config.MaxGasInvoke)
|
||||
vm.LoadScriptWithFlags(script, smartcontract.All)
|
||||
err := vm.Run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue