Skip to content

Commit

Permalink
internal/ethapi: fix nil block in function DoCall during reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Jul 26, 2024
1 parent 50e1ab3 commit 8b74b22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ func DoCall(ctx context.Context, b Backend, args CallArgs, blockNrOrHash rpc.Blo
// this makes sure resources are cleaned up.
defer cancel()

block, err := b.BlockByHash(ctx, header.Hash())
block, err := b.BlockByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
return nil, 0, false, err, nil
}
Expand Down

0 comments on commit 8b74b22

Please sign in to comment.