Skip to content

Commit

Permalink
Merge pull request #85 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: prepare for v0.2.4-hf.1
  • Loading branch information
alexgao001 authored Sep 1, 2023
2 parents 4b400b3 + 3c29eb7 commit 67d2d5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions executor/bsc_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,10 @@ func (e *BSCExecutor) ClaimRewardLoop() {
// getFinalizedBlockHeight gets the finalizedBlockHeight, which is the larger one between (fastFinalizedBlockHeight, NumberOfBlocksForFinality from config).
func (e *BSCExecutor) getFinalizedBlockHeight(ctx context.Context, rpcClient *rpc.Client) (uint64, error) {
var head *types.Header
err := rpcClient.CallContext(ctx, &head, "eth_getFinalizedHeader", e.config.BSCConfig.NumberOfBlocksForFinality)
if err == nil && head == nil {
if err := rpcClient.CallContext(ctx, &head, "eth_getFinalizedHeader", e.config.BSCConfig.NumberOfBlocksForFinality); err != nil {
return 0, err
}
if head == nil || head.Number == nil {
return 0, ethereum.NotFound
}
return head.Number.Uint64(), nil
Expand Down

0 comments on commit 67d2d5c

Please sign in to comment.