Refactor "waiting for pending blocks" log
This commit is contained in:
parent
e6e859dce2
commit
b062a682b0
|
|
@ -229,24 +229,21 @@ where
|
||||||
//
|
//
|
||||||
// Starting to wait is interesting, but logging each wait can be
|
// Starting to wait is interesting, but logging each wait can be
|
||||||
// very verbose.
|
// very verbose.
|
||||||
let mut first_wait = true;
|
if self.pending_blocks.len() > LOOKAHEAD_LIMIT {
|
||||||
while self.pending_blocks.len() > LOOKAHEAD_LIMIT {
|
|
||||||
if first_wait {
|
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
tips.len = self.prospective_tips.len(),
|
tips.len = self.prospective_tips.len(),
|
||||||
pending.len = self.pending_blocks.len(),
|
pending.len = self.pending_blocks.len(),
|
||||||
pending.limit = LOOKAHEAD_LIMIT,
|
pending.limit = LOOKAHEAD_LIMIT,
|
||||||
"waiting for pending blocks",
|
"waiting for pending blocks",
|
||||||
);
|
);
|
||||||
first_wait = false;
|
}
|
||||||
} else {
|
while self.pending_blocks.len() > LOOKAHEAD_LIMIT {
|
||||||
tracing::trace!(
|
tracing::trace!(
|
||||||
tips.len = self.prospective_tips.len(),
|
tips.len = self.prospective_tips.len(),
|
||||||
pending.len = self.pending_blocks.len(),
|
pending.len = self.pending_blocks.len(),
|
||||||
pending.limit = LOOKAHEAD_LIMIT,
|
pending.limit = LOOKAHEAD_LIMIT,
|
||||||
"continuing to wait for pending blocks",
|
"continuing to wait for pending blocks",
|
||||||
);
|
);
|
||||||
}
|
|
||||||
match self
|
match self
|
||||||
.pending_blocks
|
.pending_blocks
|
||||||
.next()
|
.next()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue