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