Introduce pubkey/unl tracking to Peer sessions. (#181)

* Adding pubkey in binary to comm sessions and is_unl flag to peer sessions.
* Removing display_name overloads and populating pubkey in user session.
* Changing peer session lookup key from uniqueid to pubkey (binary).
This commit is contained in:
Savinda Senevirathne
2020-12-02 13:05:06 +05:30
committed by GitHub
parent 596fd2b43c
commit f3055822ed
14 changed files with 81 additions and 85 deletions

View File

@@ -61,7 +61,7 @@ namespace usr
// Check whether this user is among authenticated users
// and perform authenticated msg processing.
const auto itr = ctx.users.find(session.uniqueid);
const auto itr = ctx.users.find(session.pubkey);
if (itr != ctx.users.end())
{
// This is an authed user.
@@ -95,7 +95,7 @@ namespace usr
{
// Session belongs to an authed user.
if (session.challenge_status == comm::CHALLENGE_VERIFIED)
remove_user(session.uniqueid);
remove_user(session.pubkey);
return 0;
}