mirror of https://github.com/status-im/op-geth.git
Make sure that the object exists
This commit is contained in:
parent
55e55826ee
commit
5c82fdc243
|
@ -139,7 +139,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et
|
||||||
|
|
||||||
// Do some pre processing for our "pre" events and hooks
|
// Do some pre processing for our "pre" events and hooks
|
||||||
block := self.chainManager.NewBlock(key.Address())
|
block := self.chainManager.NewBlock(key.Address())
|
||||||
coinbase := state.GetStateObject(key.Address())
|
coinbase := state.GetOrNewStateObject(key.Address())
|
||||||
coinbase.SetGasPool(block.GasLimit())
|
coinbase.SetGasPool(block.GasLimit())
|
||||||
self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
|
self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue