Source:
public boolean refreshTTL(RefreshOfferMessage refreshTTLMessage, @Nullable NodeAddress sender, boolean isDataOwner) { ByteArray hashOfPayload = new ByteArray(refreshTTLMessage.getHashOfPayload()); if (!map.containsKey((hashOfPayload))) { log.debug("We don't have data for that refresh message in our map. That is expected if we missed the data publishing."); return false; } int sequenceNumber = refreshTTLMessage.getSequenceNumber(); if (sequenceNumberMap.containsKey(hashOfPayload) && sequenceNumberMap.get(hashOfPayload).sequenceNr == sequenceNumber) { log.trace("We got that message with that seq nr already from another peer. We ignore that message."); return true; } if(!hasSequenceNrIncreased(sequenceNumber, hashOfPayload)) { return false; } ProtectedStorageEntry storedData = map.get(hashOfPayload); PublicKey ownerPubKey = storedData.getProtectedStoragePayload().getOwnerPubKey(); byte[] hashOfDataAndSeqNr = refreshTTLMessage.getHashOfDataAndSeqNr(); byte[] signature = refreshTTLMessage.getSignature(); if (!checkSignature(ownerPubKey, hashOfDataAndSeqNr, signature)) { log.trace("refreshTTL failed due to invalid entry"); return false; } if (!checkIfStoredDataPubKeyMatchesNewDataPubKey(ownerPubKey, hashOfPayload)) { log.trace("refreshTTL failed due to hash collision"); return false; } log.debug("refreshDate called for storedData:\n\t" + StringUtils.abbreviate(storedData.toString(), 100)); storedData.refreshTTL(); storedData.updateSequenceNumber(sequenceNumber); storedData.updateSignature(signature); printData("after refreshTTL"); sequenceNumberMap.put(hashOfPayload, new MapValue(sequenceNumber, System.currentTimeMillis())); sequenceNumberMapStorage.queueUpForSave(SequenceNumberMap.clone(sequenceNumberMap), 1000); broadcast(refreshTTLMessage, sender, null, isDataOwner); return true; }

Target:
public boolean refreshTTL(RefreshOfferMessage refreshTTLMessage, @Nullable NodeAddress sender, boolean isDataOwner) { ByteArray hashOfPayload = new ByteArray(refreshTTLMessage.getHashOfPayload()); if (!map.containsKey((hashOfPayload))) { log.debug("We don't have data for that refresh message in our map. That is expected if we missed the data publishing."); return false; } int sequenceNumber = refreshTTLMessage.getSequenceNumber(); if (sequenceNumberMap.containsKey(hashOfPayload) && sequenceNumberMap.get(hashOfPayload).sequenceNr == sequenceNumber) { log.trace("We got that message with that seq nr already from another peer. We ignore that message."); return true; } if(!hasSequenceNrIncreased(sequenceNumber, hashOfPayload)) return false; ProtectedStorageEntry storedData = map.get(hashOfPayload); PublicKey ownerPubKey = storedData.getProtectedStoragePayload().getOwnerPubKey(); byte[] hashOfDataAndSeqNr = refreshTTLMessage.getHashOfDataAndSeqNr(); byte[] signature = refreshTTLMessage.getSignature(); if (!checkSignature(ownerPubKey, hashOfDataAndSeqNr, signature)) return false; if (!checkIfStoredDataPubKeyMatchesNewDataPubKey(ownerPubKey, hashOfPayload)) return false; log.debug("refreshDate called for storedData:\n\t" + StringUtils.abbreviate(storedData.toString(), 100)); storedData.refreshTTL(); storedData.updateSequenceNumber(sequenceNumber); storedData.updateSignature(signature); printData("after refreshTTL"); sequenceNumberMap.put(hashOfPayload, new MapValue(sequenceNumber, System.currentTimeMillis())); sequenceNumberMapStorage.queueUpForSave(SequenceNumberMap.clone(sequenceNumberMap), 1000); broadcast(refreshTTLMessage, sender, null, isDataOwner); return true; }