From b7baceefdab01e4594b66500b54e089c91f2727a Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 18 May 2015 20:26:41 +0200 Subject: [PATCH] xeth: remove nonce on error. Fixes #1026 --- xeth/xeth.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xeth/xeth.go b/xeth/xeth.go index 88cd30afc..4d9611cbc 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -924,9 +924,11 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS tx.SetNonce(nonce) if err := self.sign(tx, from, false); err != nil { + state.RemoveNonce(from, tx.Nonce()) return "", err } if err := self.backend.TxPool().Add(tx); err != nil { + state.RemoveNonce(from, tx.Nonce()) return "", err }