diff --git a/substrate/core/finality-grandpa/src/import.rs b/substrate/core/finality-grandpa/src/import.rs index d51d0ffd84..d1ad57baa4 100644 --- a/substrate/core/finality-grandpa/src/import.rs +++ b/substrate/core/finality-grandpa/src/import.rs @@ -497,6 +497,8 @@ impl, RA, PRA, SC> BlockImport "Imported unjustified block #{} that enacts authority set change, waiting for finality for enactment.", number, ); + + imported_aux.needs_justification = true; } // we have imported block with consensus data changes, but without justification @@ -504,8 +506,6 @@ impl, RA, PRA, SC> BlockImport if enacts_consensus_change { self.consensus_changes.lock().note_change((number, hash)); } - - imported_aux.needs_justification = true; } } diff --git a/substrate/core/network/src/protocol/sync.rs b/substrate/core/network/src/protocol/sync.rs index 625d9a840a..5963ebf0f2 100644 --- a/substrate/core/network/src/protocol/sync.rs +++ b/substrate/core/network/src/protocol/sync.rs @@ -815,12 +815,7 @@ impl ChainSync { /// with or without errors. pub fn on_justification_import(&mut self, hash: B::Hash, number: NumberFor, success: bool) { let finalization_result = if success { Ok((hash, number)) } else { Err(()) }; - if !self.extra_justifications.try_finalize_root((hash, number), finalization_result, true) { - debug!(target: "sync", "Got justification import result for unknown justification {:?} {:?} request.", - hash, - number, - ) - } + self.extra_justifications.try_finalize_root((hash, number), finalization_result, true); self.is_idle = false; } diff --git a/substrate/core/network/src/protocol/sync/extra_requests.rs b/substrate/core/network/src/protocol/sync/extra_requests.rs index 9bc94d402c..6f9103d38d 100644 --- a/substrate/core/network/src/protocol/sync/extra_requests.rs +++ b/substrate/core/network/src/protocol/sync/extra_requests.rs @@ -138,7 +138,7 @@ impl ExtraRequests { } if best_finalized_number > self.best_seen_finalized_number { - match self.tree.finalize_with_ancestors( + match self.tree.finalize( best_finalized_hash, best_finalized_number, &is_descendent_of,