mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Fix bor tx missing
This commit is contained in:
parent
48bdfa7ffb
commit
3b9f73ab69
1 changed files with 3 additions and 10 deletions
|
|
@ -2006,19 +2006,12 @@ func (api *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common
|
|||
|
||||
// Try to return an already finalized transaction
|
||||
found, tx, blockHash, blockNumber, index, err := api.b.GetTransaction(ctx, hash)
|
||||
if !found {
|
||||
// No finalized transaction, try to retrieve it from the pool
|
||||
if tx := api.b.GetPoolTransaction(hash); tx != nil {
|
||||
return NewRPCPendingTransaction(tx, api.b.CurrentHeader(), api.b.ChainConfig()), nil
|
||||
}
|
||||
if err == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, NewTxIndexingError()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// fetch bor block tx if necessary
|
||||
if tx == nil {
|
||||
if !found {
|
||||
if tx, blockHash, blockNumber, index, err = api.b.GetBorBlockTransaction(ctx, hash); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue