aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-04-07 03:40:33 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-04-07 03:43:55 +0200
commit1c06aa98c63fff02679d446588fad06ae8cd706f (patch)
tree505b78cebe55e09d00d54521c434cc0af2397165 /src/main.h
parentab806a69a23c47e75821aa8a1fcd8d7f9e32999e (diff)
Always print full hashes (tx, block, inv)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/main.h b/src/main.h
index c6bd77d3dc..83d98638ce 100644
--- a/src/main.h
+++ b/src/main.h
@@ -195,11 +195,6 @@ bool AbortNode(const std::string &msg);
-static inline std::string BlockHashStr(const uint256& hash)
-{
- return hash.ToString();
-}
-
bool GetWalletFile(CWallet* pwallet, std::string &strWalletFileOut);
struct CDiskBlockPos
@@ -301,7 +296,7 @@ public:
std::string ToString() const
{
- return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10).c_str(), n);
+ return strprintf("COutPoint(%s, %u)", hash.ToString().c_str(), n);
}
void print() const
@@ -635,7 +630,7 @@ public:
{
std::string str;
str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%"PRIszu", vout.size=%"PRIszu", nLockTime=%u)\n",
- GetHash().ToString().substr(0,10).c_str(),
+ GetHash().ToString().c_str(),
nVersion,
vin.size(),
vout.size(),
@@ -1472,10 +1467,10 @@ public:
void print() const
{
printf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu")\n",
- BlockHashStr(GetHash()).c_str(),
+ GetHash().ToString().c_str(),
nVersion,
- BlockHashStr(hashPrevBlock).c_str(),
- hashMerkleRoot.ToString().substr(0,10).c_str(),
+ hashPrevBlock.ToString().c_str(),
+ hashMerkleRoot.ToString().c_str(),
nTime, nBits, nNonce,
vtx.size());
for (unsigned int i = 0; i < vtx.size(); i++)
@@ -1485,7 +1480,7 @@ public:
}
printf(" vMerkleTree: ");
for (unsigned int i = 0; i < vMerkleTree.size(); i++)
- printf("%s ", vMerkleTree[i].ToString().substr(0,10).c_str());
+ printf("%s ", vMerkleTree[i].ToString().c_str());
printf("\n");
}
@@ -1785,8 +1780,8 @@ public:
{
return strprintf("CBlockIndex(pprev=%p, pnext=%p, nHeight=%d, merkle=%s, hashBlock=%s)",
pprev, pnext, nHeight,
- hashMerkleRoot.ToString().substr(0,10).c_str(),
- BlockHashStr(GetBlockHash()).c_str());
+ hashMerkleRoot.ToString().c_str(),
+ GetBlockHash().ToString().c_str());
}
void print() const
@@ -1867,7 +1862,7 @@ public:
str += CBlockIndex::ToString();
str += strprintf("\n hashBlock=%s, hashPrev=%s)",
GetBlockHash().ToString().c_str(),
- BlockHashStr(hashPrev).c_str());
+ hashPrev.ToString().c_str());
return str;
}