| 108 | } |
| 109 | |
| 110 | void CBlock::Print() const { |
| 111 | string medianPrices; |
| 112 | const auto& priceMap = GetBlockMedianPrice(); |
| 113 | for (const auto &item : priceMap) { |
| 114 | medianPrices += strprintf("{%s/%s -> %llu}", std::get<0>(item.first), std::get<1>(item.first), item.second); |
| 115 | } |
| 116 | |
| 117 | LogPrint(BCLog::DEBUG, "[%d] hash=%s, ver=%d, hashPrevBlock=%s, merkleRootHash=%s, nTime=%u, nNonce=%u, vtx=%u, nFuelFee=%d, " |
| 118 | "nFuelRate=%d, median prices: %s\n", |
| 119 | height, GetHash().ToString(), nVersion, prevBlockHash.ToString(), merkleRootHash.ToString(), nTime, nNonce, |
| 120 | vptx.size(), nFuelFee, nFuelRate, medianPrices); |
| 121 | } |
| 122 | |
| 123 | std::tuple<bool, int> CBlock::GetTxIndex(const uint256& txid) const { |
| 124 | for (size_t i = 0; i < vMerkleTree.size(); i++) { |