Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
:
  • Loading branch information
gianfra-t committed Jul 10, 2024
1 parent 04ed781 commit 327c6b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions substrate/client/basic-authorship/src/basic_authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ where
block_size_limit: Option<usize>,
) -> Result<Proposal<Block, PR::Proof>, sp_blockchain::Error> {
let propose_with_timer = time::Instant::now();
debug!(target: LOG_TARGET, "Creating new block");

let mut block_builder =
self.client.new_block_at(self.parent_hash, inherent_digests, PR::ENABLED)?;
debug!(target: LOG_TARGET, "New block builder created");

self.apply_inherents(&mut block_builder, inherent_data)?;

Expand Down Expand Up @@ -366,6 +369,7 @@ where
let create_inherents_start = time::Instant::now();
let inherents = block_builder.create_inherents(inherent_data)?;
let create_inherents_end = time::Instant::now();
debug!(target: LOG_TARGET, "Reporting metrics");

self.metrics.report(|metrics| {
metrics.create_inherents_time.observe(
Expand All @@ -375,6 +379,8 @@ where
);
});

debug!(target: LOG_TARGET, "Applying inherents");

for inherent in inherents {
match block_builder.push(inherent) {
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() => {
Expand Down Expand Up @@ -421,6 +427,7 @@ where
let mut t1 = self.transaction_pool.ready_at(self.parent_number).fuse();
let mut t2 =
futures_timer::Delay::new(deadline.saturating_duration_since((self.now)()) / 8).fuse();
debug!(target: LOG_TARGET, "Waiting for pool to be ready");

let mut pending_iterator = select! {
res = t1 => res,
Expand Down

0 comments on commit 327c6b0

Please sign in to comment.