mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-10 23:33:05 -07:00
Logic simplification, cleanup, and memory use improvements in Membership. Also fix an issue that may cause network instability in some cases.
This commit is contained in:
parent
8a62ba07e5
commit
eddbc7e757
10 changed files with 175 additions and 124 deletions
|
@ -20,6 +20,7 @@
|
|||
#define ZT_CERTIFICATEOFREPRESENTATION_HPP
|
||||
|
||||
#include "Constants.hpp"
|
||||
#include "Credential.hpp"
|
||||
#include "Address.hpp"
|
||||
#include "C25519.hpp"
|
||||
#include "Identity.hpp"
|
||||
|
@ -47,14 +48,17 @@ namespace ZeroTier {
|
|||
* roots can shield nodes entirely and p2p connectivity behind them can
|
||||
* be disabled. This will be desirable for a number of use cases.
|
||||
*/
|
||||
class CertificateOfRepresentation
|
||||
class CertificateOfRepresentation : public Credential
|
||||
{
|
||||
public:
|
||||
static inline Credential::Type credentialType() { return Credential::CREDENTIAL_TYPE_COR; }
|
||||
|
||||
CertificateOfRepresentation()
|
||||
{
|
||||
memset(this,0,sizeof(CertificateOfRepresentation));
|
||||
}
|
||||
|
||||
inline uint32_t id() const { return 0; }
|
||||
inline uint64_t timestamp() const { return _timestamp; }
|
||||
inline const Address &representative(const unsigned int i) const { return _reps[i]; }
|
||||
inline unsigned int repCount() const { return _repCount; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue