aboutsummaryrefslogtreecommitdiffstats
path: root/core/transaction_pool.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-09-19 06:56:10 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-09-19 06:56:10 +0800
commitb94b9b0158ed2549eb025aad3da63c3cf2015a51 (patch)
treec1fb4ecc636d71a3346253cd7e89fb434d0d9ba1 /core/transaction_pool.go
parent216c486a3aef2c4e7b4c1dc37b14d321ce912723 (diff)
parentb60a27627b32dd0e76269732b834ece1fe7d5c3a (diff)
downloadgo-tangerine-b94b9b0158ed2549eb025aad3da63c3cf2015a51.tar.gz
go-tangerine-b94b9b0158ed2549eb025aad3da63c3cf2015a51.tar.zst
go-tangerine-b94b9b0158ed2549eb025aad3da63c3cf2015a51.zip
Merge pull request #1817 from obscuren/nonce-fix
core: transaction nonce recovery
Diffstat (limited to 'core/transaction_pool.go')
-rw-r--r--core/transaction_pool.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/transaction_pool.go b/core/transaction_pool.go
index 42e26b3b3..513600be3 100644
--- a/core/transaction_pool.go
+++ b/core/transaction_pool.go
@@ -121,8 +121,8 @@ func (pool *TxPool) resetState() {
if addr, err := tx.From(); err == nil {
// Set the nonce. Transaction nonce can never be lower
// than the state nonce; validatePool took care of that.
- if pool.pendingState.GetNonce(addr) < tx.Nonce() {
- pool.pendingState.SetNonce(addr, tx.Nonce())
+ if pool.pendingState.GetNonce(addr) <= tx.Nonce() {
+ pool.pendingState.SetNonce(addr, tx.Nonce()+1)
}
}
}