diff --git a/src/Config.h b/src/Config.h index 5793fd81c3..85de649e2d 100644 --- a/src/Config.h +++ b/src/Config.h @@ -64,7 +64,7 @@ public: bool LEDGER_CREATOR; // should be false unless we are starting a new ledger // Note: The following parameters do not relate to the UNL or trust at all - int NETWORK_QUORUM; // Minimum number of nodes to consider the network present + unsigned int NETWORK_QUORUM; // Minimum number of nodes to consider the network present int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative // Peer networking parameters @@ -74,7 +74,7 @@ public: std::string PEER_SSL_CIPHER_LIST; int PEER_SCAN_INTERVAL_MIN; int PEER_START_MAX; - int PEER_CONNECT_LOW_WATER; + unsigned int PEER_CONNECT_LOW_WATER; // Websocket networking parameters std::string WEBSOCKET_IP; diff --git a/src/ECIES.cpp b/src/ECIES.cpp index 447794f93a..b4c417f111 100644 --- a/src/ECIES.cpp +++ b/src/ECIES.cpp @@ -138,7 +138,7 @@ std::vector CKey::encryptECIES(CKey& otherKey, const std::vector< secret.zero(); std::vector out(plaintext.size() + ECIES_HMAC_SIZE + ECIES_ENC_KEY_SIZE + ECIES_ENC_BLK_SIZE, 0); - int len = 0, bytesWritten; + unsigned int len = 0, bytesWritten; // output IV memcpy(&(out.front()), iv.begin(), ECIES_ENC_BLK_SIZE); diff --git a/src/LedgerAcquire.cpp b/src/LedgerAcquire.cpp index ffd82a7f83..290c2afc7b 100644 --- a/src/LedgerAcquire.cpp +++ b/src/LedgerAcquire.cpp @@ -109,7 +109,7 @@ void LedgerAcquire::done() mOnComplete.empty(); mLock.unlock(); - for (int i = 0; i < triggers.size(); ++i) + for (unsigned int i = 0; i < triggers.size(); ++i) triggers[i](shared_from_this()); } diff --git a/src/LedgerIndex.cpp b/src/LedgerIndex.cpp index ac059297c9..1bcf17062f 100644 --- a/src/LedgerIndex.cpp +++ b/src/LedgerIndex.cpp @@ -5,8 +5,8 @@ uint256 Ledger::getQualityIndex(const uint256& uBase, const uint64 uNodeDir) { // Indexes are stored in big endian format: they print as hex as stored. - // Most significant bytes are first. Least significant bytes repesent adjcent entries. - // We place uNodeDir in the 8 right most bytes to be adjcent. + // Most significant bytes are first. Least significant bytes represent adjacent entries. + // We place uNodeDir in the 8 right most bytes to be adjacent. // Want uNodeDir in big endian format so ++ goes to the next entry for indexes. uint256 uNode(uBase); diff --git a/src/NetworkOPs.cpp b/src/NetworkOPs.cpp index f523274ba3..c5d89decab 100644 --- a/src/NetworkOPs.cpp +++ b/src/NetworkOPs.cpp @@ -131,7 +131,7 @@ int NetworkOPs::findTransactionsBySource(const uint256& uLedger, std::list minSeq) return 0; int count = 0; - for(int i = minSeq; i <= maxSeq; ++i) + for(unsigned int i = minSeq; i <= maxSeq; ++i) { Transaction::pointer txn = Transaction::findFrom(sourceAccount, i); if(txn) diff --git a/src/Peer.cpp b/src/Peer.cpp index b992823b58..d92a0328ff 100644 --- a/src/Peer.cpp +++ b/src/Peer.cpp @@ -799,7 +799,7 @@ void Peer::recvGetPeers(newcoin::TMGetPeers& packet) { newcoin::TMPeers peers; - for (int n=0; n& nodeIDs, std::vector ret.size()) return ret; BN_bn2bin(this, ret.begin() + (ret.size() - BN_num_bytes(this))); diff --git a/src/utils.cpp b/src/utils.cpp index 327a991854..d4edb37482 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -199,6 +199,11 @@ uint64_t htobe64(uint64_t value) //} } +uint64_t be64toh(uint64_t value) +{ + return(value); +} + #endif // vim:ts=4 diff --git a/src/utils.h b/src/utils.h index 0e1fead5cc..9e4167f5cb 100644 --- a/src/utils.h +++ b/src/utils.h @@ -24,6 +24,7 @@ #ifdef WIN32 extern uint64_t htobe64(uint64_t value); +extern uint64_t be64toh(uint64_t value); #endif #define vt_f_black "\033[30m"