Merge pull request #1034 from obscuren/tx_pool_fix

Nonce fix for failing transactions
This commit is contained in:
Jeffrey Wilcke 2015-05-18 12:28:51 -07:00
commit 6c2ad7b72e
1 changed files with 2 additions and 0 deletions

View File

@ -924,9 +924,11 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS
tx.SetNonce(nonce) tx.SetNonce(nonce)
if err := self.sign(tx, from, false); err != nil { if err := self.sign(tx, from, false); err != nil {
state.RemoveNonce(from, tx.Nonce())
return "", err return "", err
} }
if err := self.backend.TxPool().Add(tx); err != nil { if err := self.backend.TxPool().Add(tx); err != nil {
state.RemoveNonce(from, tx.Nonce())
return "", err return "", err
} }