zebrad: add debug message before state check

This reveals that there may be contention in access to the state, as
this takes a long time.
This commit is contained in:
Henry de Valence 2020-10-21 21:43:00 -07:00
parent a1a3e4db5a
commit ce2ac3336f
1 changed files with 1 additions and 0 deletions

View File

@ -526,6 +526,7 @@ where
for hash in hashes.into_iter() {
// If we've queued the download of a hash behind our current chain tip,
// we've been given bad responses by our peers. Abort the sync and restart.
tracing::debug!(?hash, "checking if state contains hash");
if self.state_contains(hash).await? {
return Err(eyre!("queued download of hash behind our chain tip"));
}