mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
compile on windows
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -138,7 +138,7 @@ std::vector<unsigned char> CKey::encryptECIES(CKey& otherKey, const std::vector<
|
||||
secret.zero();
|
||||
|
||||
std::vector<unsigned char> 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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ int NetworkOPs::findTransactionsBySource(const uint256& uLedger, std::list<Trans
|
||||
if (maxSeq > 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)
|
||||
|
||||
@@ -799,7 +799,7 @@ void Peer::recvGetPeers(newcoin::TMGetPeers& packet)
|
||||
{
|
||||
newcoin::TMPeers peers;
|
||||
|
||||
for (int n=0; n<addrs.size(); n++)
|
||||
for (unsigned int n=0; n<addrs.size(); n++)
|
||||
{
|
||||
std::string strIP;
|
||||
int iPort;
|
||||
|
||||
@@ -51,7 +51,7 @@ void SHAMap::getMissingNodes(std::vector<SHAMapNode>& nodeIDs, std::vector<uint2
|
||||
{
|
||||
d = getNode(childID, childHash, false);
|
||||
}
|
||||
catch (SHAMapMissingNode& mn)
|
||||
catch (SHAMapMissingNode& )
|
||||
{ // node is not in the map
|
||||
if (filter != NULL)
|
||||
{
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
uint256 getuint256()
|
||||
{
|
||||
uint256 ret;
|
||||
int size = BN_num_bytes(this);
|
||||
unsigned int size = BN_num_bytes(this);
|
||||
if (size > ret.size())
|
||||
return ret;
|
||||
BN_bn2bin(this, ret.begin() + (ret.size() - BN_num_bytes(this)));
|
||||
|
||||
@@ -199,6 +199,11 @@ uint64_t htobe64(uint64_t value)
|
||||
//}
|
||||
}
|
||||
|
||||
uint64_t be64toh(uint64_t value)
|
||||
{
|
||||
return(value);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user