Esempio n. 1
0
 /**
  * Note that we successfully stored to a floodfill peer and verified the result by asking another
  * floodfill peer
  */
 public void storeSuccessful() {
   // Fixme, redefined this to include both lookup and store fails,
   // need to fix the javadocs
   _failedLookupRate.addData(0, 0);
   _context.statManager().addRateData("peer.failedLookupRate", 0, 0);
   _lastStoreSuccessful = _context.clock().now();
 }
Esempio n. 2
0
  /**
   * Receive a lookup reply from the peer, where they gave us the specified info
   *
   * @param newPeers number of peers we have never seen before
   * @param oldPeers number of peers we have seen before
   * @param invalid number of peers that are invalid / out of date / otherwise b0rked
   * @param duplicate number of peers we asked them not to give us (though they're allowed to send
   *     us themselves if they don't know anyone else)
   */
  public void lookupReply(int newPeers, int oldPeers, int invalid, int duplicate) {
    _lookupReplyNew += newPeers;
    _lookupReplyOld += oldPeers;
    _lookupReplyInvalid += invalid;
    _lookupReplyDuplicate += duplicate;

    if (invalid > 0) {
      _invalidReplyRate.addData(invalid, 0);
    }
  }
Esempio n. 3
0
 /** Note that floodfill verify failed */
 public void storeFailed() {
   // Fixme, redefined this to include both lookup and store fails,
   // need to fix the javadocs
   _failedLookupRate.addData(1, 0);
   _lastStoreFailed = _context.clock().now();
 }
Esempio n. 4
0
 /** Note that the peer failed to respond to the db lookup in any way */
 public void lookupFailed() {
   _failedLookups++;
   _failedLookupRate.addData(1, 0);
   _context.statManager().addRateData("peer.failedLookupRate", 1, 0);
   _lastLookupFailed = _context.clock().now();
 }
Esempio n. 5
0
 /**
  * Note that the peer was not only able to respond to the lookup, but sent us the data we wanted!
  */
 public void lookupSuccessful() {
   _successfulLookups++;
   _failedLookupRate.addData(0, 0);
   _context.statManager().addRateData("peer.failedLookupRate", 0, 0);
   _lastLookupSuccessful = _context.clock().now();
 }