Fix ConfigFollowerInterface constructor.

This commit is contained in:
Renxuan Wang 2022-04-07 22:30:04 -07:00 committed by Zhe Wu
parent a752faf122
commit bd6d765b83
2 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,9 @@ ConfigFollowerInterface::ConfigFollowerInterface(NetworkAddress const& remote)
rollforward(Endpoint::wellKnown({ remote }, WLTOKEN_CONFIGFOLLOWER_ROLLFORWARD)),
getCommittedVersion(Endpoint::wellKnown({ remote }, WLTOKEN_CONFIGFOLLOWER_GETCOMMITTEDVERSION)) {}
ConfigFollowerInterface::ConfigFollowerInterface(Hostname const& remote)
: _id(deterministicRandom()->randomUniqueID()), hostname(remote) {}
bool ConfigFollowerInterface::operator==(ConfigFollowerInterface const& rhs) const {
return _id == rhs._id;
}

View File

@ -221,7 +221,7 @@ public:
ConfigFollowerInterface();
void setupWellKnownEndpoints();
ConfigFollowerInterface(NetworkAddress const& remote);
ConfigFollowerInterface(Hostname hostname) : hostname(hostname) {}
ConfigFollowerInterface(Hostname const& hostname);
bool operator==(ConfigFollowerInterface const& rhs) const;
bool operator!=(ConfigFollowerInterface const& rhs) const;
UID id() const { return _id; }