integration phase

This commit is contained in:
Wladimir J. van der Laan
2011-05-14 11:18:39 +02:00
parent 1f2e0df865
commit 6644d98d9e
20 changed files with 5521 additions and 11 deletions

View File

@@ -311,7 +311,7 @@ public:
CAutoBN_CTX pctx;
CBigNum bnBase = nBase;
CBigNum bn0 = 0;
string str;
std::string str;
CBigNum bn = *this;
BN_set_negative(&bn, false);
CBigNum dv;
@@ -351,7 +351,7 @@ public:
template<typename Stream>
void Unserialize(Stream& s, int nType=0, int nVersion=VERSION)
{
vector<unsigned char> vch;
std::vector<unsigned char> vch;
::Unserialize(s, vch, nType, nVersion);
setvch(vch);
}

View File

@@ -302,7 +302,7 @@ public:
char psz[sizeof(pn)*2 + 1];
for (int i = 0; i < sizeof(pn); i++)
sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
return string(psz, psz + sizeof(pn)*2);
return std::string(psz, psz + sizeof(pn)*2);
}
void SetHex(const char* psz)
@@ -632,7 +632,7 @@ inline const uint256 operator-(const uint256& a, const uint256& b) { return
inline int Testuint256AdHoc(vector<string> vArg)
inline int Testuint256AdHoc(std::vector<std::string> vArg)
{
uint256 g(0);

View File

@@ -5,8 +5,11 @@
#define BITCOIN_UTIL_H
#include "uint256.h"
//#include "cryptopp/sha.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <map>
#include <vector>
#include <string>
@@ -16,6 +19,9 @@
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <openssl/sha.h>
#include <openssl/ripemd.h>
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 int64;
@@ -552,7 +558,7 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=VERSION)
return Hash(ss.begin(), ss.end());
}
inline uint160 Hash160(const vector<unsigned char>& vch)
inline uint160 Hash160(const std::vector<unsigned char>& vch)
{
uint256 hash1;
SHA256(&vch[0], vch.size(), (unsigned char*)&hash1);