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