aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPatrick Varilly <patvarilly@gmail.com>2011-07-14 02:45:34 +0200
committerStéphane Gimenez <dev@gim.name>2011-07-14 03:29:07 +0200
commit8c41469140584f3cbdd09fb62a1287da0216f431 (patch)
treeda2b8d9445fb2db927f3f3f0fd19da36378bb0a9 /src/net.h
parent9cd22ab86296ae7039132423c7f9847bdc19a644 (diff)
Single DB transaction for all addresses in a message
Cuts disk activity at startup immensely
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index afa264b723..78055bfc69 100644
--- a/src/net.h
+++ b/src/net.h
@@ -14,6 +14,7 @@
class CMessageHeader;
class CAddress;
+class CAddrDB;
class CInv;
class CRequestTracker;
class CNode;
@@ -39,7 +40,7 @@ bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet, int nTimeout
bool Lookup(const char *pszName, std::vector<CAddress>& vaddr, int nServices, int nMaxSolutions, bool fAllowLookup = false, int portDefault = 0, bool fAllowPort = false);
bool Lookup(const char *pszName, CAddress& addr, int nServices, bool fAllowLookup = false, int portDefault = 0, bool fAllowPort = false);
bool GetMyExternalIP(unsigned int& ipRet);
-bool AddAddress(CAddress addr, int64 nTimePenalty=0);
+bool AddAddress(CAddress addr, int64 nTimePenalty=0, CAddrDB *pAddrDB=NULL);
void AddressCurrentlyConnected(const CAddress& addr);
CNode* FindNode(unsigned int ip);
CNode* ConnectNode(CAddress addrConnect, int64 nTimeout=0);