Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
502UniValue out(UniValue::VOBJ);504out.pushKV("value", ValueFromAmount(txout.nValue));505out.pushKV("n", i);507UniValue o(UniValue::VOBJ);508ScriptToUniv(txout.scriptPubKey, /*out=*/o, /*include_hex=*/true, /*include_address=*/true);509out.pushKV("scriptPubKey", std::move(o));511if (is_change_func && is_change_func(txout)) {512out.pushKV("ischange", true);513}515vout.push_back(std::move(out));517if (have_undo) {518amt_total_out += txout.nValue;519}520}521entry.pushKV("vout", std::move(vout));523if (have_undo) {524const CAmount fee = amt_total_in - amt_total_out;525CHECK_NONFATAL(MoneyRange(fee));526entry.pushKV("fee", ValueFromAmount(fee));527}529if (!block_hash.IsNull()) {530entry.pushKV("blockhash", block_hash.GetHex());531}533if (include_hex) {534entry.pushKV("hex", EncodeHexTx(tx)); // The hex-encoded transaction. Used the name "hex" to be consistent with the verbose output of "getrawtransaction".535}536}
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.