Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More logging in RegularSync and PeersClient #911

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class PeersClient(
case PeerRequestHandler.ResponseReceived(peer, message, _) =>
handleResponse(requesters, Response(peer, message.asInstanceOf[Message]))
case PeerRequestHandler.RequestFailed(peer, reason) =>
log.warning(s"Request to peer ${peer.remoteAddress} failed - reason: $reason")
handleResponse(requesters, RequestFailed(peer, reason))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ class RegularSync(
val newState = progressState.copy(initialBlock = blockNumber, currentBlock = blockNumber)
context become running(newState)
case ProgressProtocol.GotNewBlock(blockNumber) =>
log.info(s"Got information about new block [number = $blockNumber]")
val newState = progressState.copy(bestKnownNetworkBlock = blockNumber)
context become running(newState)
case ProgressProtocol.ImportedBlock(blockNumber, internally) =>
log.info(s"Imported new block [number = $blockNumber, internally = $internally]")
val newState = progressState.copy(currentBlock = blockNumber)
if (internally) {
fetcher ! InternalLastBlockImport(blockNumber)
Expand Down