Skip to content

Commit 5fa2973

Browse files
committed
Fixed LocalNetwork::fetch_connected_peers that was causing a test not to fail and detecting a bug.
1 parent 2b263cb commit 5fa2973

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/local_network.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ int LocalNetworkInterface::fetch_local_peer_id() const {
153153

154154
void LocalNetworkInterface::fetch_connected_peers(std::vector<int> &p_connected_peers) const {
155155
p_connected_peers.clear();
156+
// Get all the connected peers.
156157
for (const auto &[peer_id, _] : network->get_connected_peers()) {
157-
p_connected_peers.push_back(peer_id);
158+
if (peer_id != get_unit_authority()) {
159+
p_connected_peers.push_back(peer_id);
160+
}
158161
}
159162
}
160163

0 commit comments

Comments
 (0)