mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 16:59:26 +00:00
feat: lint
This commit is contained in:
parent
695ede28e0
commit
7562bce503
3 changed files with 2 additions and 4 deletions
|
|
@ -149,7 +149,6 @@ func WriteTxSenderNonceEntryByBlock(db ethdb.KeyValueWriter, block *types.Block,
|
|||
WriteTxSenderNonceEntry(db, sender, tx.Nonce(), tx.Hash())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ReadTxSenderNonceIndex retrieves the hash for a specific sender and nonce.
|
||||
|
|
|
|||
|
|
@ -218,7 +218,6 @@ func (b *EthAPIBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash r
|
|||
// GetTransactionBySenderAndNonce returns the hash of a transaction for the given sender and nonce.
|
||||
// It checks the pool, then enforces a nonce check against the current state, and finally checks the historical TxSenderNonce index.
|
||||
func (b *EthAPIBackend) GetTransactionBySenderAndNonce(ctx context.Context, sender common.Address, nonce uint64) (*common.Hash, error) {
|
||||
|
||||
if pool := b.eth.TxPool(); pool != nil {
|
||||
if tx := pool.GetTxBySenderAndNonce(sender, nonce); tx != nil {
|
||||
hash := tx.Hash()
|
||||
|
|
|
|||
|
|
@ -1450,8 +1450,8 @@ func (api *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common
|
|||
}
|
||||
|
||||
// GetTransactionBySenderAndNonce returns the hash of a transaction for the given sender and nonce.
|
||||
func (s *TransactionAPI) GetTransactionBySenderAndNonce(ctx context.Context, sender common.Address, nonce hexutil.Uint64) (*common.Hash, error) {
|
||||
hash, err := s.b.GetTransactionBySenderAndNonce(ctx, sender, uint64(nonce))
|
||||
func (api *TransactionAPI) GetTransactionBySenderAndNonce(ctx context.Context, sender common.Address, nonce hexutil.Uint64) (*common.Hash, error) {
|
||||
hash, err := api.b.GetTransactionBySenderAndNonce(ctx, sender, uint64(nonce))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue