| 1337 | } |
| 1338 | |
| 1339 | bool Transports::IsTrustedRouter (const i2p::data::IdentHash& ih) const |
| 1340 | { |
| 1341 | if (m_TrustedRouters.empty ()) return false; |
| 1342 | std::lock_guard<std::mutex> l(m_TrustedRoutersMutex); |
| 1343 | #if __cplusplus >= 202002L // C++20 |
| 1344 | if (m_TrustedRouters.contains (ih)) |
| 1345 | #else |
| 1346 | if (m_TrustedRouters.count (ih) > 0) |
| 1347 | #endif |
| 1348 | return true; |
| 1349 | return false; |
| 1350 | } |
| 1351 | |
| 1352 | bool Transports::IsRestrictedPeer(const i2p::data::IdentHash& ih) const |
| 1353 | { |