mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-21 14:14:28 +01:00
Make sure both filter ehaders and filters are empty before sending fi… (#1936)
* Make sure both filter ehaders and filters are empty before sending first filterheader sync message * Address nit
This commit is contained in:
parent
170242812c
commit
e7993890cb
2 changed files with 4 additions and 2 deletions
|
@ -125,7 +125,7 @@ sealed trait BlockHeader extends NetworkElement {
|
|||
* [[https://bitcoin.stackexchange.com/questions/2063/why-does-the-bitcoin-protocol-use-the-little-endian-notation]]
|
||||
* @return
|
||||
*/
|
||||
def hashBE: DoubleSha256DigestBE = hash.flip
|
||||
lazy val hashBE: DoubleSha256DigestBE = hash.flip
|
||||
|
||||
override def bytes: ByteVector = RawBlockHeaderSerializer.write(this)
|
||||
|
||||
|
|
|
@ -214,7 +214,9 @@ case class DataMessageHandler(
|
|||
// 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)
|
||||
appConfig.nodeType == NodeType.NeutrinoNode && (!syncing ||
|
||||
(filterHeaderHeightOpt.isEmpty &&
|
||||
filterHeightOpt.isEmpty))
|
||||
)
|
||||
sendFirstGetCompactFilterHeadersCommand(peerMsgSender)
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue