Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Feb 6, 2025
1 parent 90541cc commit f7832fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion turbo/rpchelper/rpc_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func GetLatestBlockNumber(tx kv.Tx) (uint64, error) {
forkchoiceHeadHash := rawdb.ReadForkchoiceHead(tx)
if forkchoiceHeadHash != (libcommon.Hash{}) {
forkchoiceHeadNum := rawdb.ReadHeaderNumber(tx, forkchoiceHeadHash)
if forkchoiceHeadNum != nil {
if forkchoiceHeadNum != nil && *forkchoiceHeadNum > 0 {
return *forkchoiceHeadNum, nil
}
}
Expand Down Expand Up @@ -91,5 +91,6 @@ func GetLatestExecutedBlockNumber(tx kv.Tx) (uint64, error) {
if err != nil {
return 0, err
}
fmt.Println("latestExecutedBn", blockNum)
return blockNum, err
}

0 comments on commit f7832fb

Please sign in to comment.