This commit is contained in:
jed
2012-05-15 16:16:44 -07:00
parent e217f30bfd
commit fec2aeb579
11 changed files with 263 additions and 162 deletions

View File

@@ -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);
}

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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)

View File

@@ -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"))
{