| 88 | } |
| 89 | |
| 90 | util::StringID |
| 91 | CorrelatedStringMap::convertPeerToLocalID(util::PeerStringID peerID) const { |
| 92 | if (peerID.empty()) { |
| 93 | return util::StringID(); |
| 94 | } |
| 95 | if (peerID.value() >= m_remoteToLocal.size()) { |
| 96 | throw std::out_of_range("Peer ID out of range!"); |
| 97 | } |
| 98 | return util::StringID(m_remoteToLocal[peerID.value()]); |
| 99 | } |
| 100 | |
| 101 | void CorrelatedStringMap::setupPeerMappings( |
| 102 | std::vector<std::string> const &peerEntries) { |