diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-19 02:26:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-19 02:52:25 +0800 |
commit | b7baceefdab01e4594b66500b54e089c91f2727a (patch) | |
tree | baa3a437383bc82a1b4126b6ca486b1ec6cf9287 /xeth | |
parent | 67d44519ce4344d5ee5f7cf37dd785ead70e8453 (diff) | |
download | dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar.gz dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar.bz2 dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar.lz dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar.xz dexon-b7baceefdab01e4594b66500b54e089c91f2727a.tar.zst dexon-b7baceefdab01e4594b66500b54e089c91f2727a.zip |
xeth: remove nonce on error. Fixes #1026
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/xeth.go | 2 |
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 } |