mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
refactor: Make node_id a const& in RemoveBlockRequest
This works around a valgrind false-positive.
This commit is contained in:
@@ -1155,7 +1155,7 @@ void PeerManagerImpl::RemoveBlockRequest(const uint256& hash, std::optional<Node
|
||||
Assume(mapBlocksInFlight.count(hash) <= MAX_CMPCTBLOCKS_INFLIGHT_PER_BLOCK);
|
||||
|
||||
while (range.first != range.second) {
|
||||
auto [node_id, list_it] = range.first->second;
|
||||
const auto& [node_id, list_it]{range.first->second};
|
||||
|
||||
if (from_peer && *from_peer != node_id) {
|
||||
range.first++;
|
||||
|
||||
Reference in New Issue
Block a user