Skip to content

Commit ff9f305

Browse files
authored
Merge pull request #911 from input-output-hk/additional-logging-regular-sync-peer-client
More logging in RegularSync and PeersClient
2 parents 4c8491d + 4f87746 commit ff9f305

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/scala/io/iohk/ethereum/blockchain/sync/PeersClient.scala

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class PeersClient(
5555
case PeerRequestHandler.ResponseReceived(peer, message, _) =>
5656
handleResponse(requesters, Response(peer, message.asInstanceOf[Message]))
5757
case PeerRequestHandler.RequestFailed(peer, reason) =>
58+
log.warning(s"Request to peer ${peer.remoteAddress} failed - reason: $reason")
5859
handleResponse(requesters, RequestFailed(peer, reason))
5960
}
6061

src/main/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSync.scala

+2
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ class RegularSync(
9797
val newState = progressState.copy(initialBlock = blockNumber, currentBlock = blockNumber)
9898
context become running(newState)
9999
case ProgressProtocol.GotNewBlock(blockNumber) =>
100+
log.info(s"Got information about new block [number = $blockNumber]")
100101
val newState = progressState.copy(bestKnownNetworkBlock = blockNumber)
101102
context become running(newState)
102103
case ProgressProtocol.ImportedBlock(blockNumber, internally) =>
104+
log.info(s"Imported new block [number = $blockNumber, internally = $internally]")
103105
val newState = progressState.copy(currentBlock = blockNumber)
104106
if (internally) {
105107
fetcher ! InternalLastBlockImport(blockNumber)

0 commit comments

Comments
 (0)