Skip to content

Commit 4f87746

Browse files
committed
added more logging in RegularSync and PeersClient
1 parent 4c8491d commit 4f87746

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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)