aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-05-19 09:28:18 +0100
committerfanquake <fanquake@gmail.com>2022-05-19 09:37:32 +0100
commitfdb82a30bed2297fa5768295207b4723a67d6562 (patch)
treebea5d00eec02ee4f25496776f573b6beb654714a /src/net_processing.cpp
parent986bae8e72481a46744e299432beeb4dffb64a9a (diff)
parentbf6526f4a0ab30f77952ecdee90cd77dd9ba06f6 (diff)
downloadbitcoin-fdb82a30bed2297fa5768295207b4723a67d6562.tar.xz
Merge bitcoin/bitcoin#25147: Net processing: follow ups to #20799 (removing support for v1 compact blocks)
bf6526f4a0ab30f77952ecdee90cd77dd9ba06f6 [test] Remove segwit argument from build_block_on_tip() (John Newbery) c65bf50b44a38bc55224d8967e0df7af60ea4f1b Remove fUseWTXID parameter from CBlockHeaderAndShortTxIDs constructor (John Newbery) Pull request description: This implements two of the suggestions from code reviews of PR 20799: - Remove fUseWTXID parameter from CBlockHeaderAndShortTxIDs constructor - Remove segwit argument from build_block_on_tip() ACKs for top commit: dergoegge: Code review ACK bf6526f4a0ab30f77952ecdee90cd77dd9ba06f6 naumenkogs: ACK bf6526f4a0ab30f77952ecdee90cd77dd9ba06f6 Tree-SHA512: d553791d1364b9e655183755e829b195c9b47f59c62371dbae49d9c0f8d84fec58cf18f4dde89591672ef5658e18c9cf0206c2efd70606980f87e506bc3bd4e5
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 06dc77d425..f9178baf25 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1666,7 +1666,7 @@ void PeerManagerImpl::BlockDisconnected(const std::shared_ptr<const CBlock> &blo
*/
void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock)
{
- std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true);
+ auto pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs>(*pblock);
const CNetMsgMaker msgMaker(PROTOCOL_VERSION);
LOCK(cs_main);
@@ -2013,7 +2013,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
if (a_recent_compact_block && a_recent_compact_block->header.GetHash() == pindex->GetBlockHash()) {
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::CMPCTBLOCK, *a_recent_compact_block));
} else {
- CBlockHeaderAndShortTxIDs cmpctblock(*pblock, true);
+ CBlockHeaderAndShortTxIDs cmpctblock{*pblock};
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::CMPCTBLOCK, cmpctblock));
}
} else {
@@ -4814,7 +4814,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
CBlock block;
bool ret = ReadBlockFromDisk(block, pBestIndex, consensusParams);
assert(ret);
- CBlockHeaderAndShortTxIDs cmpctblock(block, true);
+ CBlockHeaderAndShortTxIDs cmpctblock{block};
m_connman.PushMessage(pto, msgMaker.Make(NetMsgType::CMPCTBLOCK, cmpctblock));
}
state.pindexBestHeaderSent = pBestIndex;