From 7ebdde3715b70ef05e938876c18768ed3c3620e5 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 16 Dec 2011 18:51:45 +0100 Subject: [PATCH] scheme --- db.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/db.h b/db.h index fd4c149..ea84171 100644 --- a/db.h +++ b/db.h @@ -20,16 +20,24 @@ private: double weight; } +// seen nodes +// / \ +// (a) banned nodes tracked nodes +// / \ +// tried nodes (b) unknown nodes +// / \ +// (d) good nodes (c) non-good nodes + class CAddrDb { private: CCriticalSection cs; int nId; // number of address id's - map idToInfo; // map address id to address info - map ipToId; // map ip to id - deque ourId; // sequence of tracked nodes, in order we have tried connecting to them - set unkId; // set of nodes not yet tried - set goodId; // set of good nodes - map > banned; // nodes that are banned, with their from/to ban time + map idToInfo; // map address id to address info (b,c,d) + map ipToId; // map ip to id (b,c,d) + deque ourId; // sequence of tried nodes, in order we have tried connecting to them (c,d) + set unkId; // set of nodes not yet tried (b) + set goodId; // set of good nodes (d) + map > banned; // nodes that are banned, with their from/to ban time (a) public: void Add(const CAddress &addr);