mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
Fix compatibility of eth_getBlockTransactionCountByHash (#5297)
* fix compatibility of eth_getBlockTransactionCountByHash * fixup
This commit is contained in:
parent
e2301387eb
commit
a0c80ccbee
@ -336,7 +336,9 @@ func (api *APIImpl) GetBlockTransactionCountByHash(ctx context.Context, blockHas
|
||||
defer tx.Rollback()
|
||||
blockNum, _, _, err := rpchelper.GetBlockNumber(rpc.BlockNumberOrHash{BlockHash: &blockHash}, tx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
// (Compatibility) Every other node just return `null` for when the block does not exist.
|
||||
log.Debug("eth_getBlockTransactionCountByHash GetBlockNumber failed", "err", err)
|
||||
return nil, nil
|
||||
}
|
||||
_, txAmount, err := api._blockReader.Body(ctx, tx, blockHash, blockNum)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user