Skip to content

Commit de6f8f7

Browse files
committed
fixup! add pre-commit merkle tree to use in ABCI::FinalizeBlock
1 parent d3a2f03 commit de6f8f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/node/src/shell/finalize_block.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,12 @@ where
280280
self.state.pre_commit_block()?;
281281

282282
if let Some(migration) = &self.scheduled_migration {
283-
let migration = migration
284-
.load_and_validate()
285-
.expect("The scheduled migration is not valid.");
286-
migrations::pre_commit(&mut self.state, migration);
283+
if height == migration.height {
284+
let migration = migration
285+
.load_and_validate()
286+
.expect("The scheduled migration is not valid.");
287+
migrations::pre_commit(&mut self.state, migration);
288+
}
287289
}
288290

289291
let merkle_root = self.state.in_mem().block.pre_commit_tree.root();

0 commit comments

Comments
 (0)