Skip to content

Commit 4d75541

Browse files
authored
Merge pull request #1148 from pipermerriam/piper/improve-debug-logging-for-StateSyncer
Log number of trie nodes in StateSyncer debug logging
2 parents 47a2155 + 5e21f0a commit 4d75541

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

trinity/sync/full/state.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,17 @@ async def request_nodes(self, node_keys: Iterable[Hash32]) -> None:
238238
peer = await self.get_peer_for_request(not_yet_requested)
239239
except NoIdlePeers:
240240
self.logger.debug(
241-
"No idle peers have any of the trie nodes we want, sleeping a bit")
241+
"No idle peers have any of the %d trie nodes we want, sleeping a bit",
242+
len(not_yet_requested),
243+
)
242244
await self.sleep(0.2)
243245
continue
244246
except NoEligiblePeers:
245247
self.request_tracker.missing[time.time()] = list(not_yet_requested)
246248
self.logger.debug(
247-
"No peers have any of the trie nodes in this batch, will retry later")
249+
"No peers have any of the %d trie nodes in this batch, will retry later",
250+
len(not_yet_requested),
251+
)
248252
# TODO: disconnect a peer if the pool is full
249253
return
250254

0 commit comments

Comments
 (0)