core, eth: implement eth/65 transaction fetcher

This commit is contained in:
rjl493456442
2019-10-28 19:59:07 +08:00
committed by Péter Szilágyi
parent dcffb7777f
commit 049e17116e
15 changed files with 1344 additions and 211 deletions

View File

@ -864,6 +864,12 @@ func (pool *TxPool) Get(hash common.Hash) *types.Transaction {
return pool.all.Get(hash)
}
// Has returns an indicator whether txpool has a transaction cached with the
// given hash.
func (pool *TxPool) Has(hash common.Hash) bool {
return pool.all.Get(hash) != nil
}
// removeTx removes a single transaction from the queue, moving all subsequent
// transactions back to the future queue.
func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) {