MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ToString

Method ToString

src/primitives/block.cpp:112–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112std::string CBlock::ToString() const
113{
114 std::stringstream s;
115 s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
116 GetHash().ToString(),
117 nVersion,
118 hashPrevBlock.ToString(),
119 hashMerkleRoot.ToString(),
120 nTime, nBits, nNonce,
121 vtx.size());
122 for (unsigned int i = 0; i < vtx.size(); i++)
123 {
124 s << " " << vtx[i].ToString() << "\n";
125 }
126 s << " vMerkleTree: ";
127 for (unsigned int i = 0; i < vMerkleTree.size(); i++)
128 s << " " << vMerkleTree[i].ToString();
129 s << "\n";
130 return s.str();
131}

Callers 2

removeTxMethod · 0.45
processTransactionMethod · 0.45

Calls 2

strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected