mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-15 20:30:17 +01:00
Stop requesting merkle block messages while in neutrino mode (#1730)
This commit is contained in:
parent
61e49653b7
commit
d67c547148
1 changed files with 4 additions and 1 deletions
|
@ -311,7 +311,10 @@ case class DataMessageHandler(
|
||||||
logger.info(s"Received inv=${invMsg}")
|
logger.info(s"Received inv=${invMsg}")
|
||||||
val getData = GetDataMessage(invMsg.inventories.map {
|
val getData = GetDataMessage(invMsg.inventories.map {
|
||||||
case Inventory(TypeIdentifier.MsgBlock, hash) =>
|
case Inventory(TypeIdentifier.MsgBlock, hash) =>
|
||||||
Inventory(TypeIdentifier.MsgFilteredBlock, hash)
|
// only request the merkle block if we are spv enabled
|
||||||
|
if (appConfig.isSPVEnabled) {
|
||||||
|
Inventory(TypeIdentifier.MsgFilteredBlock, hash)
|
||||||
|
} else Inventory(TypeIdentifier.MsgBlock, hash)
|
||||||
case other: Inventory => other
|
case other: Inventory => other
|
||||||
})
|
})
|
||||||
peerMsgSender.sendMsg(getData)
|
peerMsgSender.sendMsg(getData)
|
||||||
|
|
Loading…
Add table
Reference in a new issue