mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
minor style/naming changes
This commit is contained in:
parent
fb7c90dfdf
commit
74e7f14db9
@ -104,7 +104,7 @@ namespace llarp::consensus
|
||||
// We exhausted the queue so repopulate it and try again
|
||||
|
||||
testing_queue.clear();
|
||||
const auto all = router->router_whitelist();
|
||||
const auto all = router->get_whitelist();
|
||||
testing_queue.insert(testing_queue.begin(), all.begin(), all.end());
|
||||
|
||||
std::shuffle(testing_queue.begin(), testing_queue.end(), llarp::csrng);
|
||||
|
@ -152,7 +152,7 @@ namespace llarp
|
||||
bool
|
||||
NodeDB::is_connection_allowed(const RouterID& remote) const
|
||||
{
|
||||
if (pinned_edges.size() && pinned_edges.count(remote) == 0 && !bootstraps.count(remote))
|
||||
if (pinned_edges.size() && pinned_edges.count(remote) == 0 && bootstraps.count(remote) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -243,7 +243,7 @@ namespace llarp
|
||||
}
|
||||
|
||||
bool
|
||||
NodeDB::has_router(RouterID pk) const
|
||||
NodeDB::has_rc(RouterID pk) const
|
||||
{
|
||||
return known_rcs.count(pk);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ namespace llarp
|
||||
|
||||
/// return true if we have an rc by its ident pubkey
|
||||
bool
|
||||
has_router(RouterID pk) const;
|
||||
has_rc(RouterID pk) const;
|
||||
|
||||
/// maybe get an rc by its ident pubkey
|
||||
std::optional<RemoteRC>
|
||||
|
@ -972,8 +972,8 @@ namespace llarp
|
||||
return _link_manager.get_random_connected(result);
|
||||
}
|
||||
|
||||
std::unordered_set<RouterID>
|
||||
Router::router_whitelist() const
|
||||
const std::unordered_set<RouterID>&
|
||||
Router::get_whitelist() const
|
||||
{
|
||||
return _node_db->whitelist();
|
||||
}
|
||||
|
@ -275,8 +275,8 @@ namespace llarp
|
||||
util::StatusObject
|
||||
ExtractSummaryStatus() const;
|
||||
|
||||
std::unordered_set<RouterID>
|
||||
router_whitelist() const;
|
||||
const std::unordered_set<RouterID>&
|
||||
get_whitelist() const;
|
||||
|
||||
void
|
||||
set_router_whitelist(
|
||||
|
@ -1229,7 +1229,7 @@ namespace llarp::service
|
||||
this);
|
||||
_state->snode_sessions[snode] = session;
|
||||
}
|
||||
if (not router()->node_db()->has_router(snode))
|
||||
if (not router()->node_db()->has_rc(snode))
|
||||
return false;
|
||||
auto range = nodeSessions.equal_range(snode);
|
||||
auto itr = range.first;
|
||||
|
@ -409,7 +409,7 @@ namespace llarp::service
|
||||
auto itr = intros.begin();
|
||||
while (itr != intros.end())
|
||||
{
|
||||
if (not ep.router()->node_db()->has_router(itr->router))
|
||||
if (not ep.router()->node_db()->has_rc(itr->router))
|
||||
{
|
||||
itr = intros.erase(itr);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user