From 0905b911dcb3571f6d640779bce8f4c1469c1b1d Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Tue, 12 Mar 2019 08:03:52 +0100 Subject: [PATCH] Actually use cached most recent compact block This seems to be backported wrongly. In the Bitcoin code, there is a condition on requested witness data and we took the other branch which recreates the compact block. We should have taken the other branch because we always send with witness data (there is no Segwit in Dash). --- src/net_processing.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 8df5011411..0850f5c0e5 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3348,8 +3348,7 @@ bool SendMessages(CNode* pto, CConnman& connman, const std::atomic& interr { LOCK(cs_most_recent_block); if (most_recent_block_hash == pBestIndex->GetBlockHash()) { - CBlockHeaderAndShortTxIDs cmpctblock(*most_recent_block); - connman.PushMessage(pto, msgMaker.Make(NetMsgType::CMPCTBLOCK, cmpctblock)); + connman.PushMessage(pto, msgMaker.Make(NetMsgType::CMPCTBLOCK, *most_recent_compact_block)); fGotBlockFromCache = true; } }