upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.h b/src/main.h
index fde3a4e..7e5bdf2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -650,11 +650,11 @@ public:
650 string ToString() const 650 string ToString() const
651 { 651 {
652 string str; 652 string str;
653 str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%d, vout.size=%d, nLockTime=%d)\n", 653 str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%d, vout.size=%d, nLockTime=%u)\n",
654 GetHash().ToString().substr(0,6).c_str(), 654 GetHash().ToString().substr(0,6).c_str(),
655 nVersion, 655 nVersion,
656 vin.size(), 656 (int)vin.size(),
657 vout.size(), 657 (int)vout.size(),
658 nLockTime); 658 nLockTime);
659 for (int i = 0; i < vin.size(); i++) 659 for (int i = 0; i < vin.size(); i++)
660 str += " " + vin[i].ToString() + "\n"; 660 str += " " + vin[i].ToString() + "\n";
@@ -1081,7 +1081,7 @@ public:
1081 hashPrevBlock.ToString().substr(0,14).c_str(), 1081 hashPrevBlock.ToString().substr(0,14).c_str(),
1082 hashMerkleRoot.ToString().substr(0,6).c_str(), 1082 hashMerkleRoot.ToString().substr(0,6).c_str(),
1083 nTime, nBits, nNonce, 1083 nTime, nBits, nNonce,
1084 vtx.size()); 1084 (int)vtx.size());
1085 for (int i = 0; i < vtx.size(); i++) 1085 for (int i = 0; i < vtx.size(); i++)
1086 { 1086 {
1087 printf(" "); 1087 printf(" ");
@@ -1223,8 +1223,10 @@ public:
1223 1223
1224 string ToString() const 1224 string ToString() const
1225 { 1225 {
1226 return strprintf("CBlockIndex(nprev=%08x, pnext=%08x, nFile=%d, nBlockPos=%-6d nHeight=%d, merkle=%s, hashBlock=%s)", 1226 // pprev/pnext are pointers: %08x truncated them to 32 bits on a 64-bit
1227 pprev, pnext, nFile, nBlockPos, nHeight, 1227 // build, so the two fields this line exists to show were unreliable.
1228 return strprintf("CBlockIndex(nprev=%p, pnext=%p, nFile=%d, nBlockPos=%-6d nHeight=%d, merkle=%s, hashBlock=%s)",
1229 (void*)pprev, (void*)pnext, nFile, nBlockPos, nHeight,
1228 hashMerkleRoot.ToString().substr(0,6).c_str(), 1230 hashMerkleRoot.ToString().substr(0,6).c_str(),
1229 GetBlockHash().ToString().substr(0,14).c_str()); 1231 GetBlockHash().ToString().substr(0,14).c_str());
1230 } 1232 }