mirror of
https://github.com/status-im/op-geth.git
synced 2025-01-14 00:34:42 +00:00
xeth: remove nonce on error. Fixes #1026
This commit is contained in:
parent
67d44519ce
commit
b7baceefda
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user