From b695c82520548f62f65937731def1224c72dce48 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 28 May 2014 15:07:11 +0200 Subject: Fixes #60 --- ethchain/transaction_pool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethchain/transaction_pool.go') diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go index 7198026a8..ba2ffcef5 100644 --- a/ethchain/transaction_pool.go +++ b/ethchain/transaction_pool.go @@ -106,7 +106,7 @@ func (pool *TxPool) ProcessTransaction(tx *Transaction, state *State, toContract sender := state.GetAccount(tx.Sender()) if sender.Nonce != tx.Nonce { - err = fmt.Errorf("[TXPL] Invalid account nonce, state nonce is %d transaction nonce is %d instead", sender.Nonce, tx.Nonce) + err = NonceError(tx.Nonce, sender.Nonce) return } @@ -235,7 +235,7 @@ func (pool *TxPool) RemoveInvalid(state *State) { tx := e.Value.(*Transaction) sender := state.GetAccount(tx.Sender()) err := pool.ValidateTransaction(tx) - if err != nil || sender.Nonce != tx.Nonce { + if err != nil || sender.Nonce >= tx.Nonce { pool.pool.Remove(e) } } -- cgit v1.2.3