mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 07:23:46 +00:00
txpool_contentByAccount same as txpool_contentFrom
This commit is contained in:
parent
16ebfd9503
commit
86c470809d
4 changed files with 0 additions and 29 deletions
|
|
@ -494,25 +494,6 @@ func (pool *TxPool) Content() (map[common.Address]types.Transactions, map[common
|
||||||
return pending, queued
|
return pending, queued
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContentByAccount retrieves the data content of the transaction pool with a specific account,
|
|
||||||
// returning the pending as well as queued transaction.
|
|
||||||
func (pool *TxPool) ContentByAccount(addr common.Address) (pending, queued types.Transactions) {
|
|
||||||
pool.mu.Lock()
|
|
||||||
defer pool.mu.Unlock()
|
|
||||||
|
|
||||||
list, ok := pool.pending[addr]
|
|
||||||
if ok {
|
|
||||||
pending = list.Flatten()
|
|
||||||
}
|
|
||||||
|
|
||||||
list, ok = pool.queue[addr]
|
|
||||||
if ok {
|
|
||||||
queued = list.Flatten()
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContentFrom retrieves the data content of the transaction pool, returning the
|
// ContentFrom retrieves the data content of the transaction pool, returning the
|
||||||
// pending as well as queued transactions of this address, grouped by nonce.
|
// pending as well as queued transactions of this address, grouped by nonce.
|
||||||
func (pool *TxPool) ContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
func (pool *TxPool) ContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
||||||
|
|
|
||||||
|
|
@ -267,10 +267,6 @@ func (b *EthAPIBackend) TxPoolContent() (map[common.Address]types.Transactions,
|
||||||
return b.eth.TxPool().Content()
|
return b.eth.TxPool().Content()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *EthAPIBackend) TxPoolContentByAccount(addr common.Address) (pending, queued types.Transactions) {
|
|
||||||
return b.eth.TxPool().ContentByAccount(addr)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *EthAPIBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
func (b *EthAPIBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
||||||
return b.eth.TxPool().ContentFrom(addr)
|
return b.eth.TxPool().ContentFrom(addr)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ type Backend interface {
|
||||||
GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
|
GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
|
||||||
Stats() (pending int, queued int)
|
Stats() (pending int, queued int)
|
||||||
TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
|
TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
|
||||||
TxPoolContentByAccount(address common.Address) (pending, queued types.Transactions)
|
|
||||||
TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions)
|
TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions)
|
||||||
SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
|
SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,11 +222,6 @@ func (b *LesApiBackend) TxPoolContent() (map[common.Address]types.Transactions,
|
||||||
return b.eth.txPool.Content()
|
return b.eth.txPool.Content()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *LesApiBackend) TxPoolContentByAccount(addr common.Address) (pending, queued types.Transactions) {
|
|
||||||
// TODO(barryz) not implement for light node.
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *LesApiBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
func (b *LesApiBackend) TxPoolContentFrom(addr common.Address) (types.Transactions, types.Transactions) {
|
||||||
return b.eth.txPool.ContentFrom(addr)
|
return b.eth.txPool.ContentFrom(addr)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue