Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | private: | ||||
int nVersion; | int nVersion; | ||||
std::string strSubVer; | std::string strSubVer; | ||||
int nStartingHeight; | int nStartingHeight; | ||||
std::vector<CAddress> *vAddr; | std::vector<CAddress> *vAddr; | ||||
int ban; | int ban; | ||||
int64_t doneAfter; | int64_t doneAfter; | ||||
CAddress you; | CAddress you; | ||||
CheckpointState checkpointState; | CheckpointState checkpointState; | ||||
bool isReliable; | |||||
bool hasBeenTriedBefore; | |||||
int64_t timeSinceFoundOrLastSuccess; | |||||
deadalnix: If it is a time since event X, then it needs to be continuously updated, which I don't really… | |||||
int GetTimeout() { return you.IsTor() ? 120 : 30; } | int GetTimeout() { return you.IsTor() ? 120 : 30; } | ||||
void BeginMessage(const char *pszCommand); | void BeginMessage(const char *pszCommand); | ||||
void AbortMessage(); | void AbortMessage(); | ||||
void EndMessage(); | void EndMessage(); | ||||
void Send(); | void Send(); | ||||
void PushVersion(); | void PushVersion(); | ||||
bool ProcessMessages(); | bool ProcessMessages(); | ||||
protected: | protected: | ||||
PeerMessagingState ProcessMessage(std::string strCommand, | PeerMessagingState ProcessMessage(std::string strCommand, | ||||
CDataStream &recv); | CDataStream &recv); | ||||
void DetermineBan(bool testResult); | |||||
public: | public: | ||||
CSeederNode(const CService &ip, std::vector<CAddress> *vAddrIn); | CSeederNode(const CService &ip, const bool reliable, const bool triedBefore, | ||||
const int64_t timeFirstFoundOrLastSuccess, | |||||
std::vector<CAddress> *vAddrIn); | |||||
bool Run(); | bool Run(); | ||||
int GetBan() { return ban; } | int GetBan() { return ban; } | ||||
int GetClientVersion() { return nVersion; } | int GetClientVersion() { return nVersion; } | ||||
std::string GetClientSubVersion() { return strSubVer; } | std::string GetClientSubVersion() { return strSubVer; } | ||||
int GetStartingHeight() { return nStartingHeight; } | int GetStartingHeight() { return nStartingHeight; } | ||||
}; | }; | ||||
#endif // BITCOIN_SEEDER_BITCOIN_H | #endif // BITCOIN_SEEDER_BITCOIN_H |
If it is a time since event X, then it needs to be continuously updated, which I don't really think you want to be doing.