core: fixes for review comments

This commit is contained in:
Felix Lange 2019-06-14 12:29:38 +02:00 committed by Péter Szilágyi
parent a7102dac68
commit ac0387fefa
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
2 changed files with 2 additions and 2 deletions

View file

@ -737,7 +737,7 @@ func (pool *TxPool) AddLocal(tx *types.Transaction) error {
// AddRemotes enqueues a batch of transactions into the pool if they are valid. If the // AddRemotes enqueues a batch of transactions into the pool if they are valid. If the
// senders are not among the locally tracked ones, full pricing constraints will apply. // senders are not among the locally tracked ones, full pricing constraints will apply.
// //
// This method is used to add transactions from the p2p and does not wait for pool // This method is used to add transactions from the p2p network and does not wait for pool
// reorganization and internal event propagation. // reorganization and internal event propagation.
func (pool *TxPool) AddRemotes(txs []*types.Transaction) []error { func (pool *TxPool) AddRemotes(txs []*types.Transaction) []error {
return pool.addTxs(txs, false, false) return pool.addTxs(txs, false, false)

View file

@ -280,7 +280,7 @@ func TestTransactionQueue(t *testing.T) {
pool.currentState.SetNonce(from, 2) pool.currentState.SetNonce(from, 2)
pool.enqueueTx(tx.Hash(), tx) pool.enqueueTx(tx.Hash(), tx)
pool.promoteExecutables([]common.Address{from}) <-pool.promoteExecutables([]common.Address{from})
if _, ok := pool.pending[from].txs.items[tx.Nonce()]; ok { if _, ok := pool.pending[from].txs.items[tx.Nonce()]; ok {
t.Error("expected transaction to be in tx pool") t.Error("expected transaction to be in tx pool")
} }