diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-19 07:25:16 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-19 07:25:16 -0800 |
commit | 1f3bc1c2399fb53eb1b2222194332aca07a31a36 (patch) | |
tree | e7afd7d6d4b892af685985f75d5b3d7b5c2330be /src/net.cpp | |
parent | cd2b8832fdb087e740e8d6da69c75f46d69b52d2 (diff) | |
parent | f8ded588a2f78ac2767a60c716a7d15c273b4fc7 (diff) |
Merge pull request #707 from gavinandresen/BIP14
Implement BIP 14 : separate protocol version from client version
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 50d28913e0..7d2f18b2d0 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -727,6 +727,21 @@ void CNode::Cleanup() } +void CNode::PushVersion() +{ + /// when NTP implemented, change to just nTime = GetAdjustedTime() + int64 nTime = (fInbound ? GetAdjustedTime() : GetTime()); + CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr); + CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost); + RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); + PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, + nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>()), nBestHeight); +} + + + + + std::map<unsigned int, int64> CNode::setBanned; CCriticalSection CNode::cs_setBanned; |