Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion process/sync/storageBootstrap/baseStorageBootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ func (st *storageBootstrapper) setCurrentBlockInfo(

// set also last executed block info and header
// this will be useful at transition to Supernova with headers v3
st.blkc.SetLastExecutedBlockHeaderAndRootHash(header, headerHash, header.GetRootHash())
st.blkc.SetLastExecutedBlockHeaderAndRootHash(header, headerHash, rootHash)

Copilot AI Mar 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change fixes which root hash is persisted for the last executed block (using the computed rootHash parameter, which may differ from header.GetRootHash() when scheduled root hashes are involved), but there’s no unit test covering the non-v3 path. Please add a test that sets rootHash to a value different from header.GetRootHash() and asserts SetLastExecutedBlockHeaderAndRootHash receives the computed root hash (e.g., the scheduled root hash).

Copilot uses AI. Check for mistakes.

lastExecResHandler, err := common.GetOrCreateLastExecutionResultForPrevHeader(header, headerHash)
if err != nil {
Expand Down
Loading