This commit is contained in:
myriadcoin
2015-07-09 00:43:45 +02:00
parent 92ebd5be96
commit df3976ca8e
3 changed files with 14 additions and 12 deletions
+11
View File
@@ -1135,6 +1135,17 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
// CBlock and CBlockIndex
//
std::string CDiskBlockIndex::ToString() const
{
std::string str = "CDiskBlockIndex(";
str += CBlockIndex::ToString();
str += strprintf("\n hashBlock=%s, hashPrev=%s, hashParentBlock=%s)",
GetBlockHash().ToString().c_str(),
hashPrev.ToString().c_str(),
(auxpow.get() != NULL) ? auxpow->GetParentBlockHash(GetAlgo()).ToString().substr(0,20).c_str() : "-");
return str;
}
bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
{
// Open history file to append
+1 -10
View File
@@ -1061,7 +1061,6 @@ public:
//CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) {
// hashPrev = (pprev ? pprev->GetBlockHash() : 0);
//}
explicit CDiskBlockIndex(CBlockIndex* pindex, boost::shared_ptr<CAuxPow> auxpow) : CBlockIndex(*pindex) {
hashPrev = (pprev ? pprev->GetBlockHash() : 0);
this->auxpow = auxpow;
@@ -1105,15 +1104,7 @@ public:
}
std::string ToString() const
{
std::string str = "CDiskBlockIndex(";
str += CBlockIndex::ToString();
str += strprintf("\n hashBlock=%s, hashPrev=%s)",
GetBlockHash().ToString().c_str(),
hashPrev.ToString().c_str());
return str;
}
std::string ToString() const;
void print() const
{
+2 -2
View File
@@ -26,13 +26,13 @@ extern const std::string CLIENT_DATE;
// network protocol versioning
//
static const int PROTOCOL_VERSION = 70002;
static const int PROTOCOL_VERSION = 70003;
// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 209;
static const int MIN_PEER_PROTO_VERSION = 70002;
// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this