mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/txpool: implement blobpool.ContentFrom
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
f22a2d64e8
commit
06394e068b
1 changed files with 13 additions and 4 deletions
|
|
@ -1645,11 +1645,20 @@ func (p *BlobPool) Content() (map[common.Address][]*types.Transaction, map[commo
|
|||
|
||||
// ContentFrom retrieves the data content of the transaction pool, returning the
|
||||
// pending as well as queued transactions of this address, grouped by nonce.
|
||||
//
|
||||
// For the blob pool, this method will return nothing for now.
|
||||
// TODO(karalabe): Abstract out the returned metadata.
|
||||
func (p *BlobPool) ContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction) {
|
||||
return []*types.Transaction{}, []*types.Transaction{}
|
||||
p.lock.Lock()
|
||||
defer p.lock.Unlock()
|
||||
|
||||
var pending []*types.Transaction
|
||||
if metas, ok := p.index[addr]; ok {
|
||||
for _, meta := range metas {
|
||||
if tx, err := p.get(meta.id); err == nil {
|
||||
pending = append(pending, tx)
|
||||
}
|
||||
}
|
||||
}
|
||||
var queued []*types.Transaction // No non-executable txs in the blob pool
|
||||
return pending, queued
|
||||
}
|
||||
|
||||
// Locals retrieves the accounts currently considered local by the pool.
|
||||
|
|
|
|||
Loading…
Reference in a new issue