Changeset 9cd90b0 for core/java


Ignore:
Timestamp:
Feb 23, 2019 5:03:04 PM (17 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e1385a7
Parents:
5440a34
Message:

NetDB: Use published date, not earliest lease expiration, for LS2 comparisons
Fix earliest LS expiration adjustment when publishing for LS2,
so .38 routers won't reject as not newer
Don't start new store after verify fail if we've already done so
Increase flood candidates for LS2
Version checks for encrypted LS2
FVSJ cleanups
log tweaks, javadocs

File:
1 edited

Legend:

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

    r5440a34 r9cd90b0  
    5151        // prevents decryption in super
    5252        _checked = true;
     53    }
     54
     55    /**
     56     * Published timestamp, as received.
     57     * Different than getDate(), which is the earliest lease expiration.
     58     *
     59     * @return in ms, with 1 second resolution
     60     * @since 0.9.39
     61     */
     62    public long getPublished() {
     63        return _published;
    5364    }
    5465
     
    385396    protected void writeHeader(OutputStream out) throws DataFormatException, IOException {
    386397        _destination.writeBytes(out);
    387         if (_published <= 0)
    388             _published = Clock.getInstance().now();
     398        if (_published <= 0) {
     399            // we round it here, so comparisons during verifies aren't wrong
     400            _published = ((Clock.getInstance().now() + 500) / 1000) * 1000;
     401        }
    389402        long pub1k = _published / 1000;
    390403        DataHelper.writeLong(out, 4, pub1k);
     
    576589        buf.append("\n\tExpires: ").append(new java.util.Date(_expires));
    577590        buf.append("\n\tLeases: #").append(getLeaseCount());
    578         for (int i = 0; i < getLeaseCount(); i++)
     591        for (int i = 0; i < getLeaseCount(); i++) {
    579592            buf.append("\n\t\t").append(getLease(i));
     593        }
    580594        buf.append("]");
    581595        return buf.toString();
Note: See TracChangeset for help on using the changeset viewer.