mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
refactor: unify container presence checks - trivial counts
The changes made here were: | From | To | |-------------------|------------------| | `m.count(k)` | `m.contains(k)` | | `!m.count(k)` | `!m.contains(k)` | | `m.count(k) == 0` | `!m.contains(k)` | | `m.count(k) != 0` | `m.contains(k)` | | `m.count(k) > 0` | `m.contains(k)` | The commit contains the trivial, mechanical refactors where it doesn't matter if the container can have multiple elements or not Co-authored-by: Jan B <608446+janb84@users.noreply.github.com>
This commit is contained in:
@@ -1158,7 +1158,7 @@ std::chrono::microseconds PeerManagerImpl::NextInvToInbounds(std::chrono::micros
|
||||
|
||||
bool PeerManagerImpl::IsBlockRequested(const uint256& hash)
|
||||
{
|
||||
return mapBlocksInFlight.count(hash);
|
||||
return mapBlocksInFlight.contains(hash);
|
||||
}
|
||||
|
||||
bool PeerManagerImpl::IsBlockRequestedFromOutbound(const uint256& hash)
|
||||
|
||||
Reference in New Issue
Block a user