aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-19 02:26:41 +0800
committerobscuren <geffobscura@gmail.com>2015-05-19 02:52:25 +0800
commitb7baceefdab01e4594b66500b54e089c91f2727a (patch)
treebaa3a437383bc82a1b4126b6ca486b1ec6cf9287
parent67d44519ce4344d5ee5f7cf37dd785ead70e8453 (diff)
downloadgo-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar.gz
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar.bz2
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar.lz
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar.xz
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.tar.zst
go-tangerine-b7baceefdab01e4594b66500b54e089c91f2727a.zip
xeth: remove nonce on error. Fixes #1026
-rw-r--r--xeth/xeth.go2
1 files changed, 2 insertions, 0 deletions
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
}