aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-10-03 19:03:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-10-03 20:09:33 +0200
commit529a4d4824136a00e63cd69831023b9c4dd6936b (patch)
treea28facc0b26511fc7370ac1dcd2b2dc84d2f5331 /src/net.h
parent0547b02af78dcf2d84e4905b56c7f95d9582b2f9 (diff)
downloadbitcoin-529a4d4824136a00e63cd69831023b9c4dd6936b.tar.xz
remove "checkorder" and "reply" P2P commands
These command are a leftover from send-to-IP transactions, which have been removed a long time ago. Also removes CNode::mapRequests and CNode::PushRequests, as these were only used for the mentioned commands.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/net.h b/src/net.h
index 3717c4e634..c841fa7368 100644
--- a/src/net.h
+++ b/src/net.h
@@ -19,7 +19,6 @@
#include "protocol.h"
#include "addrman.h"
-class CRequestTracker;
class CNode;
class CBlockIndex;
extern int nBestHeight;
@@ -74,25 +73,6 @@ enum
MSG_BLOCK,
};
-class CRequestTracker
-{
-public:
- void (*fn)(void*, CDataStream&);
- void* param1;
-
- explicit CRequestTracker(void (*fnIn)(void*, CDataStream&)=NULL, void* param1In=NULL)
- {
- fn = fnIn;
- param1 = param1In;
- }
-
- bool IsNull()
- {
- return fn == NULL;
- }
-};
-
-
/** Thread types */
enum threadId
{
@@ -188,8 +168,6 @@ protected:
public:
int64 nReleaseTime;
- std::map<uint256, CRequestTracker> mapRequests;
- CCriticalSection cs_mapRequests;
uint256 hashContinue;
CBlockIndex* pindexLastGetBlocksBegin;
uint256 hashLastGetBlocksEnd;
@@ -563,53 +541,6 @@ public:
}
}
-
- void PushRequest(const char* pszCommand,
- void (*fn)(void*, CDataStream&), void* param1)
- {
- uint256 hashReply;
- RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply));
-
- {
- LOCK(cs_mapRequests);
- mapRequests[hashReply] = CRequestTracker(fn, param1);
- }
-
- PushMessage(pszCommand, hashReply);
- }
-
- template<typename T1>
- void PushRequest(const char* pszCommand, const T1& a1,
- void (*fn)(void*, CDataStream&), void* param1)
- {
- uint256 hashReply;
- RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply));
-
- {
- LOCK(cs_mapRequests);
- mapRequests[hashReply] = CRequestTracker(fn, param1);
- }
-
- PushMessage(pszCommand, hashReply, a1);
- }
-
- template<typename T1, typename T2>
- void PushRequest(const char* pszCommand, const T1& a1, const T2& a2,
- void (*fn)(void*, CDataStream&), void* param1)
- {
- uint256 hashReply;
- RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply));
-
- {
- LOCK(cs_mapRequests);
- mapRequests[hashReply] = CRequestTracker(fn, param1);
- }
-
- PushMessage(pszCommand, hashReply, a1, a2);
- }
-
-
-
void PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd);
bool IsSubscribed(unsigned int nChannel);
void Subscribe(unsigned int nChannel, unsigned int nHops=0);