debug -> trace for some verbose logs
This commit is contained in:
parent
0e7bd1fbf3
commit
7cb07cc49f
@ -138,7 +138,7 @@ impl ConsensusWeb3Rpcs {
|
|||||||
let head_num = self.head_block.number();
|
let head_num = self.head_block.number();
|
||||||
|
|
||||||
if Some(head_num) >= needed_block_num {
|
if Some(head_num) >= needed_block_num {
|
||||||
debug!("best (head) block: {}", head_num);
|
trace!("best (head) block: {}", head_num);
|
||||||
return ShouldWaitForBlock::Ready;
|
return ShouldWaitForBlock::Ready;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,15 +153,14 @@ impl ConsensusWeb3Rpcs {
|
|||||||
.iter()
|
.iter()
|
||||||
.any(|rpc| self.rpc_will_work_eventually(rpc, needed_block_num, skip_rpcs))
|
.any(|rpc| self.rpc_will_work_eventually(rpc, needed_block_num, skip_rpcs))
|
||||||
{
|
{
|
||||||
// TODO: too verbose
|
trace!("everything in this ranking ({:?}) is skipped", next_ranking);
|
||||||
debug!("everything in this ranking ({:?}) is skipped", next_ranking);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let next_head_num = next_ranking.head_num.as_ref();
|
let next_head_num = next_ranking.head_num.as_ref();
|
||||||
|
|
||||||
if next_head_num >= needed_block_num {
|
if next_head_num >= needed_block_num {
|
||||||
debug!("best (head) block: {:?}", next_head_num);
|
trace!("best (head) block: {:?}", next_head_num);
|
||||||
return ShouldWaitForBlock::Ready;
|
return ShouldWaitForBlock::Ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,14 +169,12 @@ impl ConsensusWeb3Rpcs {
|
|||||||
|
|
||||||
// TODO: this seems wrong
|
// TODO: this seems wrong
|
||||||
if best_num.is_some() {
|
if best_num.is_some() {
|
||||||
// TODO: too verbose
|
trace!("best (old) block: {:?}", best_num);
|
||||||
debug!("best (old) block: {:?}", best_num);
|
|
||||||
ShouldWaitForBlock::Wait {
|
ShouldWaitForBlock::Wait {
|
||||||
current: best_num.copied(),
|
current: best_num.copied(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// TODO: too verbose
|
trace!("never ready");
|
||||||
debug!("never ready");
|
|
||||||
ShouldWaitForBlock::NeverReady
|
ShouldWaitForBlock::NeverReady
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,16 +203,16 @@ impl ConsensusWeb3Rpcs {
|
|||||||
if let Some(rpc_data) = self.rpc_data.get(rpc) {
|
if let Some(rpc_data) = self.rpc_data.get(rpc) {
|
||||||
match rpc_data.head_block_num.cmp(needed_block_num) {
|
match rpc_data.head_block_num.cmp(needed_block_num) {
|
||||||
Ordering::Less => {
|
Ordering::Less => {
|
||||||
debug!("{} is behind. let it catch up", rpc);
|
trace!("{} is behind. let it catch up", rpc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Ordering::Greater | Ordering::Equal => {
|
Ordering::Greater | Ordering::Equal => {
|
||||||
// rpc is synced past the needed block. make sure the block isn't too old for it
|
// rpc is synced past the needed block. make sure the block isn't too old for it
|
||||||
if self.has_block_data(rpc, needed_block_num) {
|
if self.has_block_data(rpc, needed_block_num) {
|
||||||
debug!("{} has {}", rpc, needed_block_num);
|
trace!("{} has {}", rpc, needed_block_num);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
debug!("{} does not have {}", rpc, needed_block_num);
|
trace!("{} does not have {}", rpc, needed_block_num);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user