process meta LS2

This commit is contained in:
orignal 2019-01-02 14:19:10 -05:00
parent 2e56c4895d
commit c54e6bafdb
3 changed files with 81 additions and 22 deletions
libi2pd

View file

@ -661,15 +661,13 @@ namespace data
uint8_t storeType = buf[DATABASE_STORE_TYPE_OFFSET];
if (storeType) // LeaseSet or LeaseSet2
{
if (storeType == 1)
if (storeType == NETDB_STORE_TYPE_LEASESET) // 1
{
// 1 - LeaseSet
LogPrint (eLogDebug, "NetDb: store request: LeaseSet for ", ident.ToBase32());
updated = AddLeaseSet (ident, buf + offset, len - offset, m->from);
}
else
else // all others are considered as LeaseSet2
{
// 3- LeaseSet2
LogPrint (eLogDebug, "NetDb: store request: LeaseSet2 of type ", storeType, " for ", ident.ToBase32());
updated = AddLeaseSet2 (ident, buf + offset, len - offset, storeType);
}