re-create LeaseSet if store type has changed

This commit is contained in:
orignal 2019-01-16 19:00:17 -05:00
parent 468a32a819
commit 65c2c7d80b
4 changed files with 52 additions and 48 deletions

View file

@ -60,7 +60,7 @@ namespace data
LeaseSet (const uint8_t * buf, size_t len, bool storeLeases = true);
virtual ~LeaseSet () { delete[] m_EncryptionKey; delete[] m_Buffer; };
void Update (const uint8_t * buf, size_t len, bool verifySignature = true);
virtual void Update (const uint8_t * buf, size_t len, bool verifySignature = true);
bool IsNewer (const uint8_t * buf, size_t len) const;
void PopulateLeases (); // from buffer
@ -128,7 +128,8 @@ namespace data
LeaseSet2 (uint8_t storeType, const uint8_t * buf, size_t len, bool storeLeases = true);
uint8_t GetStoreType () const { return m_StoreType; };
void Update (const uint8_t * buf, size_t len, bool verifySignature);
// implements RoutingDestination
void Encrypt (const uint8_t * data, uint8_t * encrypted, BN_CTX * ctx) const;