refactor: Convert RPCs and merkleblock from uint256 to Txid

This commit is contained in:
marcofleon
2025-07-23 17:16:09 +01:00
parent 49b3d3a92a
commit 326f244724
12 changed files with 78 additions and 80 deletions

View File

@@ -2352,9 +2352,8 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
// they must either disconnect and retry or request the full block.
// Thus, the protocol spec specified allows for us to provide duplicate txn here,
// however we MUST always provide at least what the remote peer needs
typedef std::pair<unsigned int, uint256> PairType;
for (PairType& pair : merkleBlock.vMatchedTxn)
MakeAndPushMessage(pfrom, NetMsgType::TX, TX_NO_WITNESS(*pblock->vtx[pair.first]));
for (const auto& [tx_idx, _] : merkleBlock.vMatchedTxn)
MakeAndPushMessage(pfrom, NetMsgType::TX, TX_NO_WITNESS(*pblock->vtx[tx_idx]));
}
// else
// no response