nit: we don't actually use the Txid element here, so we can avoid the typedef altogether:
<details>
<summary>git diff on a20724d926</summary>
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 318b50f7fe..30074bff71 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -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, Txid> PairType;
- for (PairType& pair : merkleBlock.vMatchedTxn)
- MakeAndPushMessage(pfrom, NetMsgType::TX, TX_NO_WITNESS(*pblock->vtx[pair.first]));
+ for (auto& [tx_idx, _] : merkleBlock.vMatchedTxn)
+ MakeAndPushMessage(pfrom, NetMsgType::TX, TX_NO_WITNESS(*pblock->vtx[tx_idx]));
}
// else
// no response
</details>