mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/tracing: GetPoolTransactionBySenderAndNonce
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
acdf44bc14
commit
7c1d2467db
2 changed files with 6 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ type Backend interface {
|
||||||
BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
|
BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
|
||||||
BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
|
BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
|
||||||
GetTransaction(ctx context.Context, txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64, error)
|
GetTransaction(ctx context.Context, txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64, error)
|
||||||
|
GetPoolTransactionBySenderAndNonce(sender common.Address, nonce uint64) *types.Transaction
|
||||||
ChainConfig() *params.ChainConfig
|
ChainConfig() *params.ChainConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,11 @@ func (b *EthAPIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
|
||||||
return b.eth.txPool.Get(hash)
|
return b.eth.txPool.Get(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetPoolTransactionBySenderAndNonce retrieves the pool transaction by the sender and it's nonce
|
||||||
|
func (b *EthAPIBackend) GetPoolTransactionBySenderAndNonce(sender common.Address, nonce uint64) *types.Transaction {
|
||||||
|
return b.eth.txPool.GetBySenderAndNonce(sender, nonce)
|
||||||
|
}
|
||||||
|
|
||||||
// GetTransaction retrieves the lookup along with the transaction itself associate
|
// GetTransaction retrieves the lookup along with the transaction itself associate
|
||||||
// with the given transaction hash.
|
// with the given transaction hash.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue