Skip to content

Commit f7832fb

Browse files
committed
save
1 parent 90541cc commit f7832fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

turbo/rpchelper/rpc_block.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func GetLatestBlockNumber(tx kv.Tx) (uint64, error) {
3737
forkchoiceHeadHash := rawdb.ReadForkchoiceHead(tx)
3838
if forkchoiceHeadHash != (libcommon.Hash{}) {
3939
forkchoiceHeadNum := rawdb.ReadHeaderNumber(tx, forkchoiceHeadHash)
40-
if forkchoiceHeadNum != nil {
40+
if forkchoiceHeadNum != nil && *forkchoiceHeadNum > 0 {
4141
return *forkchoiceHeadNum, nil
4242
}
4343
}
@@ -91,5 +91,6 @@ func GetLatestExecutedBlockNumber(tx kv.Tx) (uint64, error) {
9191
if err != nil {
9292
return 0, err
9393
}
94+
fmt.Println("latestExecutedBn", blockNum)
9495
return blockNum, err
9596
}

0 commit comments

Comments
 (0)