From 548f9ca1d36ceaa20f38c1e0531ddcb080e6a12c Mon Sep 17 00:00:00 2001 From: Alexander Shevtsov Date: Tue, 10 Mar 2026 02:02:01 +0100 Subject: [PATCH] Change block data request to get witness block block() was sending Block instead of WitnessBlock. Probaby this was a regression introduced when the `filter-control` feature flag was removed (4ed9a55). The original code conditionally used `Inventory::WitnessBlock` under that feature; when the feature was removed the `WitnessBlock` path was lost and `Inventory::Block` became the unconditional default. --- src/network/outbound.rs | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/network/outbound.rs b/src/network/outbound.rs index 48b47eaf..d0aecd96 100644 --- a/src/network/outbound.rs +++ b/src/network/outbound.rs @@ -50,7 +50,7 @@ impl MessageGenerator { } pub(in crate::network) fn block(&mut self, hash: BlockHash) -> Vec { - let inv = Inventory::Block(hash); + let inv = Inventory::WitnessBlock(hash); let msg = NetworkMessage::GetData(vec![inv]); self.serialize(msg) } @@ -79,6 +79,35 @@ fn encrypt_plaintext(encryptor: &mut PacketWriter, plaintext: Vec) -> Vec, network: &Network) -> VersionMessage { let now = SystemTime::now() .duration_since(UNIX_EPOCH)