mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
windows
This commit is contained in:
@@ -54,6 +54,6 @@ double Amount::getDisplayQuantity() const
|
||||
{
|
||||
if(!mCurrency.isNational()) throw std::runtime_error("Can only scale national currencies");
|
||||
int scale=mCurrency.getScale();
|
||||
return static_cast<double>(mQuantity) * pow(10, 128-scale);
|
||||
return static_cast<double>(mQuantity) * pow((double)10, 128-scale);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
bool AddSystemEntropy()
|
||||
{ // Get entropy from the Windows crypto provider
|
||||
RAND_screen(); // this isn't really that safe since it only works for end users not servers
|
||||
|
||||
/* TODO: you need the cryptoAPI installed I think for the below to work. I suppose we should require people to install this to build the windows version
|
||||
char name[512], rand[128];
|
||||
DWORD count = 500;
|
||||
HCRYPTOPROV cryptoHandle;
|
||||
@@ -39,6 +42,8 @@ bool AddSystemEntropy()
|
||||
|
||||
CryptReleaseContext(cryptoHandle, 0);
|
||||
RAND_seed(rand, 128);
|
||||
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include "Serializer.h"
|
||||
#include "BitcoinUtil.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#include <iostream>
|
||||
#include "Serializer.h"
|
||||
#include "BitcoinUtil.h"
|
||||
#include "SHAMap.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#include <iostream>
|
||||
#include "SHAMap.h"
|
||||
|
||||
void SHAMap::getMissingNodes(std::vector<SHAMapNode>& nodeIDs, std::vector<uint256>& hashes, int max)
|
||||
|
||||
@@ -115,12 +115,14 @@ int main(int argc, char* argv[])
|
||||
if (iCmd)
|
||||
vCmd = vm["parameters"].as<std::vector<std::string> >();
|
||||
|
||||
/*
|
||||
char* pvCmd[iCmd];
|
||||
|
||||
for (int i=0; i != iCmd; ++i)
|
||||
pvCmd[i] = (char*) (vCmd[0].c_str());
|
||||
|
||||
iResult = unit_test_main(init_unit_test, iCmd, pvCmd);
|
||||
*/
|
||||
}
|
||||
else if (!vm.count("parameters"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user