mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
refactor: Convert RPCs and merkleblock from uint256 to Txid
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user