minor style/naming changes

This commit is contained in:
Thomas Winget 2023-11-27 13:28:45 -05:00 committed by dr7ana
parent fb7c90dfdf
commit 74e7f14db9
7 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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>

View File

@ -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();
}

View File

@ -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(

View File

@ -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;

View File

@ -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;