aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:57:16 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:57:16 -0700
commitf158e363a4f7fed90d94ab967815164b5f854bed (patch)
tree1ae04bdb8de0286beb2b761ab3d910b08920a984 /src/main.h
parentf439fe945d9008c28871d446007259cd41926825 (diff)
parent1c06aa98c63fff02679d446588fad06ae8cd706f (diff)
Merge pull request #2478 from sipa/fullhash
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 303588306d..9a3664a437 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;
}