check leaseset timestamp

This commit is contained in:
orignal 2016-02-16 22:57:38 -05:00
parent febc00d357
commit f2168774a5
3 changed files with 51 additions and 15 deletions

View file

@ -47,6 +47,7 @@ namespace data
LeaseSet (std::shared_ptr<const i2p::tunnel::TunnelPool> pool);
~LeaseSet () { delete[] m_Buffer; };
void Update (const uint8_t * buf, size_t len);
bool IsNewer (const uint8_t * buf, size_t len) const;
void PopulateLeases (); // from buffer
std::shared_ptr<const IdentityEx> GetIdentity () const { return m_Identity; };
@ -69,6 +70,7 @@ namespace data
private:
void ReadFromBuffer (bool readIdentity = true);
uint64_t ExtractTimestamp (const uint8_t * buf, size_t len) const; // min expiration time
private: