Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add parent header hash to log
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Dec 1, 2021
1 parent 627c439 commit 16e8a3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions runtime/parachains/src/paras_inherent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,12 @@ impl<T: Config> Pallet<T> {
mut disputes,
} = data;

let parent_header_hash = parent_header.hash();

log::debug!(
target: LOG_TARGET,
"[enter] bitfields.len(): {}, backed_candidates.len(): {}, disputes.len() {}",
"[enter_inner] parent_header={:?} bitfields.len(): {}, backed_candidates.len(): {}, disputes.len() {}",
parent_header_hash,
signed_bitfields.len(),
backed_candidates.len(),
disputes.len()
Expand All @@ -272,7 +275,7 @@ impl<T: Config> Pallet<T> {
// Check that the submitted parent header indeed corresponds to the previous block hash.
let parent_hash = <frame_system::Pallet<T>>::parent_hash();
ensure!(
parent_header.hash().as_ref() == parent_hash.as_ref(),
parent_header_hash.as_ref() == parent_hash.as_ref(),
Error::<T>::InvalidParentHeader,
);

Expand Down

0 comments on commit 16e8a3d

Please sign in to comment.