Skip to content

Commit

Permalink
add logs for deadline
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Jun 26, 2024
1 parent f60318f commit 899d708
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions substrate/client/basic-authorship/src/basic_authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@ where
None,
Box::pin(async move {
// leave some time for evaluation and block finalization (33%)
trace!(target: LOG_TARGET, "now = {:?}", (self.now)());
trace!(target: LOG_TARGET, "max duration = {:?}", max_duration);
trace!(target: LOG_TARGET, "max duration * 1/3 = {:?}", max_duration / 3);
let deadline = (self.now)() + max_duration - max_duration / 3;

trace!(target: LOG_TARGET, "deadline = {:?}", deadline);
let res = self
.propose_with(inherent_data, inherent_digests, deadline, block_size_limit)
.await;
Expand Down Expand Up @@ -447,6 +452,7 @@ where
};

let now = (self.now)();
debug!(target: LOG_TARGET, "now = {:?}, deadline = {:?}", now, deadline);
if now > deadline {
debug!(
target: LOG_TARGET,
Expand Down

0 comments on commit 899d708

Please sign in to comment.