From cf5ad266f6b8b7dd4800b63404c0efe680d47673 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 4 Jun 2015 15:44:42 +0200 Subject: [PATCH] core: only change the nonce if the account nonce is lower --- core/transaction_pool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/transaction_pool.go b/core/transaction_pool.go index c59eaa0619..a0f3c326a7 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -69,7 +69,9 @@ func (pool *TxPool) Start() { for _, tx := range pool.pending { if addr, err := tx.From(); err == nil { - pool.state.SetNonce(addr, tx.Nonce()) + if pool.state.GetNonce(addr) < tx.Nonce() { + pool.state.SetNonce(addr, tx.Nonce()) + } } }