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
1992
1992
hash = h
1993
1993
} else {
1994
1994
block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
1995
- if err != nil {
1995
+ if block == nil || err != nil {
1996
1996
return nil , err
1997
1997
}
1998
1998
hash = block .Hash ()
@@ -2011,7 +2011,7 @@ func (api *DebugAPI) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNum
2011
2011
hash = h
2012
2012
} else {
2013
2013
block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
2014
- if err != nil {
2014
+ if block == nil || err != nil {
2015
2015
return nil , err
2016
2016
}
2017
2017
hash = block .Hash ()
@@ -2030,7 +2030,7 @@ func (api *DebugAPI) GetRawReceipts(ctx context.Context, blockNrOrHash rpc.Block
2030
2030
hash = h
2031
2031
} else {
2032
2032
block , err := api .b .BlockByNumberOrHash (ctx , blockNrOrHash )
2033
- if err != nil {
2033
+ if block == nil || err != nil {
2034
2034
return nil , err
2035
2035
}
2036
2036
hash = block .Hash ()
You can’t perform that action at this time.
0 commit comments