Skip to content

Commit

Permalink
mod
Browse files Browse the repository at this point in the history
  • Loading branch information
wanliqun committed Sep 20, 2024
1 parent ccc5801 commit dfbc881
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ func NormalizeEthBlockNumber(
// pending or latest => latest_mined or latest_state
block, err := w3c.Eth.BlockByNumber(*blockNum, false)
if err != nil {
return nil, errors.WithMessagef(err, "failed to get block (%v)", *blockNum)
blockText, _ := blockNum.MarshalText()
return nil, errors.WithMessagef(err, "failed to get block (%v)", blockText)
}

// !!! eth rpc may return nil for `pending` and `earlist` block number
Expand Down

0 comments on commit dfbc881

Please sign in to comment.