Changeset cd97718 for core/java


Ignore:
Timestamp:
Mar 4, 2019 5:06:01 PM (17 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5d3b7c1
Parents:
54d9a29
Message:

I2CP, NetDB: More encrypted LS2 fixes (WIP)
Marked encrypted LS hash as local
Fix isCurrent() on encrypted LS
Fix unpublish of encrypted LS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/LeaseSet2.java

    r54d9a29 rcd97718  
    280280        if (log.shouldWarn())
    281281            log.warn("Don't set revocation key in ls2", new Exception("I did it"));
     282    }
     283
     284    /**
     285     * Determine whether the leaseset is currently valid, at least within a given
     286     * fudge factor.
     287     * Overridden to use the expiration time instead of the last expiration.
     288     *
     289     * @param fudge milliseconds fudge factor to allow between the current time
     290     * @return true if there are current leases, false otherwise
     291     * @since 0.9.39
     292     */
     293    @Override
     294    public boolean isCurrent(long fudge) {
     295        long now = Clock.getInstance().now();
     296        return _expires > now - fudge;
    282297    }
    283298
Note: See TracChangeset for help on using the changeset viewer.