File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1992,7 +1992,7 @@ func (api *DebugAPI) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNu
19921992 hash = h
19931993 } else {
19941994 block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
1995- if err != nil {
1995+ if block == nil || err != nil {
19961996 return nil , err
19971997 }
19981998 hash = block .Hash ()
@@ -2011,7 +2011,7 @@ func (api *DebugAPI) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNum
20112011 hash = h
20122012 } else {
20132013 block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
2014- if err != nil {
2014+ if block == nil || err != nil {
20152015 return nil , err
20162016 }
20172017 hash = block .Hash ()
@@ -2030,7 +2030,7 @@ func (api *DebugAPI) GetRawReceipts(ctx context.Context, blockNrOrHash rpc.Block
20302030 hash = h
20312031 } else {
20322032 block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
2033- if err != nil {
2033+ if block == nil || err != nil {
20342034 return nil , err
20352035 }
20362036 hash = block .Hash ()
You can’t perform that action at this time.
0 commit comments