Bump bitcoin-s.node.query-wait-time=120 seconds (#4759)

* Bump query-wait-time to 120 seconds

* bump disconnection log level

* Bump log to INFO where peer disconnects us
This commit is contained in:
Chris Stewart 2022-09-10 09:47:50 -05:00 committed by GitHub
parent 7d9d0c577f
commit fae1a53579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -172,7 +172,7 @@ bitcoin-s {
try-peers-interval = 12s
# wait time for queries like getheaders etc before switching to another
query-wait-time = 15s
query-wait-time = 120s
hikari-logging = true
hikari-logging-interval = 10 minute

View File

@ -194,7 +194,7 @@ case class NodeAppConfig(baseDatadir: Path, configOverrides: Vector[Config])(
if (config.hasPath("bitcoin-s.node.query-wait-time")) {
val duration = config.getDuration("bitcoin-s.node.query-wait-time")
TimeUtil.durationToFiniteDuration(duration)
} else 15.seconds
} else 120.seconds
}
/** maximum consecutive number of invalid responses allowed from the same peer */

View File

@ -392,7 +392,7 @@ case class P2PClientActor(
unalignedBytes
case closeCmd @ (Tcp.ConfirmedClosed | Tcp.Closed | Tcp.Aborted |
Tcp.PeerClosed) =>
logger.debug(
logger.info(
s"We've been disconnected by $peer command=${closeCmd} state=${currentPeerMsgHandlerRecv.state}")
currentPeerMsgHandlerRecv =
Await.result(currentPeerMsgHandlerRecv.disconnect(), timeout)
@ -505,7 +505,7 @@ case class P2PClientActor(
case P2PClient.CloseCommand =>
peerConnectionOpt match {
case Some(peerConnection) =>
logger.debug(s"Disconnecting from peer $peer")
logger.info(s"Disconnecting from peer $peer")
context become ignoreNetworkMessages(Some(peerConnection),
ByteVector.empty)
currentPeerMsgHandlerRecv =
@ -516,7 +516,7 @@ case class P2PClientActor(
s"Attempting to disconnect peer that was not connected!")
}
case P2PClient.CloseAnyStateCommand =>
logger.debug(s"Received close any state for $peer")
logger.info(s"Received close any state for $peer")
peerConnectionOpt match {
case Some(peerConnection) =>
context become ignoreNetworkMessages(Some(peerConnection),