vm: make (*VM).GasLimit public
VM is inherently single-threaded and replacing setter/getter methods with public field simplifies code a bit.
This commit is contained in:
parent
1f97f3abd8
commit
a7d4fff897
4 changed files with 8 additions and 14 deletions
|
@ -906,7 +906,7 @@ func (s *Server) invokescript(reqParams request.Params) (interface{}, *response.
|
|||
// result.
|
||||
func (s *Server) runScriptInVM(script []byte, tx *transaction.Transaction) *result.Invoke {
|
||||
vm := s.chain.GetTestVM(tx)
|
||||
vm.SetGasLimit(s.config.MaxGasInvoke)
|
||||
vm.GasLimit = s.config.MaxGasInvoke
|
||||
vm.LoadScriptWithFlags(script, smartcontract.All)
|
||||
_ = vm.Run()
|
||||
result := &result.Invoke{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue