Changeset 268a3ee for router


Ignore:
Timestamp:
Mar 4, 2019 5:38:26 PM (13 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0b28965
Parents:
ad1600e
Message:

NetDB: Fix finding tunnels to publish encrypted LS2
log tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java

    rad1600e r268a3ee  
    9191        }
    9292        if (_log.shouldLog(Log.DEBUG))
    93             _log.debug(getJobId() + ": New store job for " + data, new Exception("I did it"));
     93            _log.debug(getJobId() + ": New store job for\n" + data, new Exception("I did it"));
    9494    }
    9595
     
    201201                           !shouldStoreEncLS2To((RouterInfo)ds)) {
    202202                    if (_log.shouldInfo())
    203                         _log.info(getJobId() + ": Skipping router that doesn't support LS2 " + peer);
     203                        _log.info(getJobId() + ": Skipping router that doesn't support Enc LS2 " + peer);
    204204                    _state.addSkipped(peer);
    205205                    skipped++;
     
    448448    private void sendStoreThroughClient(DatabaseStoreMessage msg, RouterInfo peer, long expiration) {
    449449        long token = 1 + getContext().random().nextLong(I2NPMessage.MAX_ID_VALUE);
    450         Hash client = msg.getKey();
     450        Hash client;
     451        if (msg.getEntry().getType() == DatabaseEntry.KEY_TYPE_ENCRYPTED_LS2) {
     452            // get the real client hash
     453            client = ((LeaseSet)msg.getEntry()).getDestination().calculateHash();
     454        } else {
     455            client = msg.getKey();
     456        }
    451457
    452458        Hash to = peer.getIdentity().getHash();
     
    550556    /**
    551557     * Is it new enough?
    552      * @since 0.9.38
     558     * @since 0.9.39
    553559     */
    554560    static boolean shouldStoreEncLS2To(RouterInfo ri) {
Note: See TracChangeset for help on using the changeset viewer.