mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-22 14:33:06 +01:00
Send get filters message if we haven't cached any yet (#1900)
This commit is contained in:
parent
71e3fbabde
commit
f59015bc39
1 changed files with 7 additions and 1 deletions
|
@ -209,7 +209,13 @@ case class DataMessageHandler(
|
|||
"which is less than max. This means we are synced,",
|
||||
"not requesting more.")
|
||||
.mkString(" "))
|
||||
if (appConfig.nodeType == NodeType.NeutrinoNode && !syncing)
|
||||
// If we are in neutrino mode, we might need to start fetching filters and their headers
|
||||
// if we are syncing we should do this, however, sometimes syncing isn't a good enough check,
|
||||
// so we also check if our cached filter heights have been set as well, if they haven't then
|
||||
// we probably need to sync filters
|
||||
if (
|
||||
appConfig.nodeType == NodeType.NeutrinoNode && (!syncing || filterHeaderHeightOpt.isEmpty || filterHeightOpt.isEmpty)
|
||||
)
|
||||
sendFirstGetCompactFilterHeadersCommand(peerMsgSender)
|
||||
else
|
||||
Future.successful(syncing)
|
||||
|
|
Loading…
Add table
Reference in a new issue