Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ func (api *DebugAPI) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNu
hash = h
} else {
block, err := api.b.BlockByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
if block == nil || err != nil {
return nil, err
}
hash = block.Hash()
Expand All @@ -1694,7 +1694,7 @@ func (api *DebugAPI) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNum
hash = h
} else {
block, err := api.b.BlockByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
if block == nil || err != nil {
return nil, err
}
hash = block.Hash()
Expand All @@ -1713,7 +1713,7 @@ func (api *DebugAPI) GetRawReceipts(ctx context.Context, blockNrOrHash rpc.Block
hash = h
} else {
block, err := api.b.BlockByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
if block == nil || err != nil {
return nil, err
}
hash = block.Hash()
Expand Down