mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
RPC: fix nil pointer on error
This commit is contained in:
parent
e90dd3eb41
commit
bc5c09f5fc
@ -50,6 +50,9 @@ func (api *APIImpl) GetTransactionByHash(ctx context.Context, hash common.Hash)
|
||||
}
|
||||
|
||||
curHeader := rawdb.ReadCurrentHeader(tx)
|
||||
if curHeader == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// No finalized transaction, try to retrieve it from the pool
|
||||
reply, err := api.txPool.Transactions(ctx, &txpool.TransactionsRequest{Hashes: []*types.H256{gointerfaces.ConvertHashToH256(hash)}})
|
||||
|
Loading…
Reference in New Issue
Block a user