good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8c7e4b29 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Added pre processing of transaction on the transient state

parent 56538981
Branches
Tags
No related merge requests found
...@@ -136,11 +136,17 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et ...@@ -136,11 +136,17 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et
tx.Nonce = nonce tx.Nonce = nonce
tx.Sign(key.PrivateKey) tx.Sign(key.PrivateKey)
// Do some pre processing for our "pre" events and hooks
block := self.blockChain.NewBlock(key.Address())
coinbase := state.GetStateObject(key.Address())
coinbase.SetGasPool(block.GasLimit)
self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
err := self.obj.TxPool().Add(tx) err := self.obj.TxPool().Add(tx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
state.SetNonce(key.Address(), nonce+1) state.SetNonce(key.Address(), nonce+1)
if contractCreation { if contractCreation {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment