net: Use deterministic randomness for CNode's nonce, and make it const

This commit is contained in:
Cory Fields
2016-10-26 15:10:15 -04:00
parent aff6584e09
commit 59ac5c5b72
4 changed files with 24 additions and 13 deletions

View File

@@ -669,7 +669,7 @@ public:
CAmount lastSentFeeFilter;
int64_t nextSendTimeFeeFilter;
CNode(NodeId id, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress &addrIn, uint64_t nKeyedNetGroupIn, const std::string &addrNameIn = "", bool fInboundIn = false);
CNode(NodeId id, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress &addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const std::string &addrNameIn = "", bool fInboundIn = false);
~CNode();
private:
@@ -677,7 +677,7 @@ private:
void operator=(const CNode&);
uint64_t nLocalHostNonce;
const uint64_t nLocalHostNonce;
// Services offered to this peer
const ServiceFlags nLocalServices;
const int nMyStartingHeight;