mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
don't copy RouterInfos and LeaseSets
This commit is contained in:
parent
207022a6bb
commit
f3c6dd4d3d
6 changed files with 50 additions and 24 deletions
15
LeaseSet.cpp
15
LeaseSet.cpp
|
@ -13,6 +13,17 @@ namespace data
|
|||
|
||||
LeaseSet::LeaseSet (const uint8_t * buf, int len)
|
||||
{
|
||||
ReadFromBuffer (buf, len);
|
||||
}
|
||||
|
||||
void LeaseSet::Update (const uint8_t * buf, int len)
|
||||
{
|
||||
m_Leases.clear ();
|
||||
ReadFromBuffer (buf, len);
|
||||
}
|
||||
|
||||
void LeaseSet::ReadFromBuffer (const uint8_t * buf, int len)
|
||||
{
|
||||
#pragma pack(1)
|
||||
struct H
|
||||
{
|
||||
|
@ -55,8 +66,8 @@ namespace data
|
|||
CryptoPP::DSA::Verifier verifier (pubKey);
|
||||
if (!verifier.VerifyMessage (buf, leases - buf, leases, 40))
|
||||
LogPrint ("LeaseSet verification failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const std::vector<Lease> LeaseSet::GetNonExpiredLeases () const
|
||||
{
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue