Skip to content

Commit

Permalink
Add a log at INFO level to indicate we are making progress while sync…
Browse files Browse the repository at this point in the history
…ing (#780)

* Add a log at INFO level to indicate we are making progress while syncing

* Adjust sync log message to INFO in p2p code

* Fix off by one error

* Run scalafmt
  • Loading branch information
Christewart committed Oct 3, 2019
1 parent 5ec86ae commit 6476e34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ case class ChainHandler(
val newChainHandler = this.copy(blockchains = chains)

createdF.map { _ =>
chains.foreach { c =>
logger.info(
s"Processed headers from height=${c(headers.length - 1).height} to ${c.height}. Best hash=${c.tip.hashBE.hex}")
}
newChainHandler
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ case class DataMessageHandler(
}

if (count.toInt == HeadersMessage.MaxHeadersCount) {
logger.error(
logger.info(
s"Received maximum amount of headers in one header message. This means we are not synced, requesting more")
peerMsgSender
.sendGetHeadersMessage(lastHash)
Expand Down

0 comments on commit 6476e34

Please sign in to comment.