public boolean peerFound(PeerAddress remotePeer, PeerAddress referrer, PeerConnection peerConnection) {
boolean firsthand = referrer == null;
if (firsthand) {
peerOffline.remove(remotePeer.peerId());
Number320 keyToRemove = null;
PeerStatistic statToRemove = null;
for (Map.Entry<Number320, TrackerData> entry : dataMapUnverified.entrySet()) {
for (Map.Entry<PeerStatistic, Data> entry2 : entry.getValue().peerAddresses().entrySet()) {
PeerAddress tmp = entry2.getKey().peerAddress();
if (tmp.equals(remotePeer)) {
if (add(entry.getKey(), entry2.getKey(), dataMap, entry2.getValue())) {
// only remove from unverified if we could store to
// verified
keyToRemove = entry.getKey();
statToRemove = entry2.getKey();
statToRemove.successfullyChecked();
// TODO: here we can break to the if statement below
}
}
}
}