Skip to content

Commit

Permalink
Merge remote-tracking branch 'node-real/main' into alpha4
Browse files Browse the repository at this point in the history
# Conflicts:
#	turbo/rpchelper/helper.go
  • Loading branch information
blxdyx committed Oct 15, 2024
2 parents c8a5f69 + 4df9747 commit 9f3ca6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions turbo/rpchelper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ func _GetBlockNumber(ctx context.Context, requireCanonical bool, blockNrOrHash r
}
if fs := parliafinality.GetFinalizationService(); fs != nil {
blockHash := fs.GetFinalizeBlockHash()
blockNum := rawdb.ReadHeaderNumber(tx, blockHash)
if blockNum != nil {
if blockNum := rawdb.ReadHeaderNumber(tx, blockHash); blockNum != nil {
return *blockNum, blockHash, false, true, nil
}
}
Expand All @@ -99,8 +98,7 @@ func _GetBlockNumber(ctx context.Context, requireCanonical bool, blockNrOrHash r
case rpc.SafeBlockNumber:
if fs := parliafinality.GetFinalizationService(); fs != nil {
blockHash := fs.GetSafeBlockHash()
blockNum := rawdb.ReadHeaderNumber(tx, blockHash)
if blockNum != nil {
if blockNum := rawdb.ReadHeaderNumber(tx, blockHash); blockNum != nil {
return *blockNum, blockHash, false, true, nil
}
}
Expand Down

0 comments on commit 9f3ca6b

Please sign in to comment.