core: ensure transactions correctly drop on pool limiting

This commit is contained in:
Péter Szilágyi
2017-06-22 17:01:49 +03:00
parent b0b3cf2eeb
commit eebde1a2e2
3 changed files with 167 additions and 88 deletions

View File

@ -360,7 +360,7 @@ func (pool *TxPool) validateTx(ctx context.Context, tx *types.Transaction) error
currentState := pool.currentState()
if n, err := currentState.GetNonce(ctx, from); err == nil {
if n > tx.Nonce() {
return core.ErrNonce
return core.ErrNonceTooLow
}
} else {
return err