diff options
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/xeth.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index 157fe76c7..187892a49 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -936,22 +936,22 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS tx = types.NewTransactionMessage(to, value, gas, price, data) } - state := self.backend.ChainManager().TxState() + state := self.backend.TxPool().State() var nonce uint64 if len(nonceStr) != 0 { nonce = common.Big(nonceStr).Uint64() } else { - nonce = state.NewNonce(from) + nonce = state.GetNonce(from) + 1 //state.NewNonce(from) } tx.SetNonce(nonce) if err := self.sign(tx, from, false); err != nil { - state.RemoveNonce(from, tx.Nonce()) + //state.RemoveNonce(from, tx.Nonce()) return "", err } if err := self.backend.TxPool().Add(tx); err != nil { - state.RemoveNonce(from, tx.Nonce()) + //state.RemoveNonce(from, tx.Nonce()) return "", err } |