mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 18:02:54 +01:00
Adjust so that requery in the case were we have just 1 peer (#5240)
This commit is contained in:
parent
922a6aaeb4
commit
3763a53ad5
@ -500,8 +500,11 @@ case class DataMessageHandler(
|
||||
queryF.map(_ => HeaderSync(newPeer, state.peers))
|
||||
case None =>
|
||||
logger.warn(
|
||||
s"Received invalid header from peer=$peer. Only have 1 peer so cannot re-query, state=$state")
|
||||
Future.successful(state)
|
||||
s"Received invalid header from peer=$peer. Only have 1 peer so re-querying from same peer, state=$state")
|
||||
val queryF = peerMessageSenderApi.sendGetHeadersMessage(
|
||||
cachedHeaders,
|
||||
Some(peer))
|
||||
queryF.map(_ => state)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user