aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-28 21:07:11 +0800
committerobscuren <geffobscura@gmail.com>2014-05-28 21:07:11 +0800
commitb695c82520548f62f65937731def1224c72dce48 (patch)
treeac818aa8755ada39799c3c7db851d14b9ab72acd /ethchain/transaction_pool.go
parenta98e35d7a048850fb77fad49fff7364cf77a9bae (diff)
downloaddexon-b695c82520548f62f65937731def1224c72dce48.tar.gz
dexon-b695c82520548f62f65937731def1224c72dce48.tar.zst
dexon-b695c82520548f62f65937731def1224c72dce48.zip
Fixes #60
Diffstat (limited to 'ethchain/transaction_pool.go')
-rw-r--r--ethchain/transaction_pool.go4
1 files changed, 2 insertions, 2 deletions
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)
}
}