mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 66be456d93 into merged_master (Bitcoin PR bitcoin/bitcoin#23320)
This commit is contained in:
commit
3ce9952451
3 changed files with 47 additions and 20 deletions
|
|
@ -259,26 +259,21 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
|
|||
const Coin& prev_coin = txundo->vprevout[i];
|
||||
const CTxOut& prev_txout = prev_coin.out;
|
||||
|
||||
switch (verbosity) {
|
||||
case TxVerbosity::SHOW_TXID:
|
||||
case TxVerbosity::SHOW_DETAILS:
|
||||
break;
|
||||
|
||||
case TxVerbosity::SHOW_DETAILS_AND_PREVOUT:
|
||||
UniValue o_script_pub_key(UniValue::VOBJ);
|
||||
ScriptPubKeyToUniv(prev_txout.scriptPubKey, o_script_pub_key, /* includeHex */ true);
|
||||
if (verbosity == TxVerbosity::SHOW_DETAILS_AND_PREVOUT) {
|
||||
UniValue o_script_pub_key(UniValue::VOBJ);
|
||||
ScriptPubKeyToUniv(prev_txout.scriptPubKey, o_script_pub_key, /*include_hex=*/ true);
|
||||
|
||||
UniValue p(UniValue::VOBJ);
|
||||
p.pushKV("generated", bool(prev_coin.fCoinBase));
|
||||
p.pushKV("height", uint64_t(prev_coin.nHeight));
|
||||
if (prev_txout.nValue.IsExplicit()) {
|
||||
p.pushKV("value", ValueFromAmount(prev_txout.nValue.GetAmount()));
|
||||
} else {
|
||||
p.pushKV("value", "<confidential>");
|
||||
}
|
||||
p.pushKV("scriptPubKey", o_script_pub_key);
|
||||
in.pushKV("prevout", p);
|
||||
break;
|
||||
UniValue p(UniValue::VOBJ);
|
||||
p.pushKV("generated", bool(prev_coin.fCoinBase));
|
||||
p.pushKV("height", uint64_t(prev_coin.nHeight));
|
||||
if (prev_txout.nValue.IsExplicit()) {
|
||||
p.pushKV("value", ValueFromAmount(prev_txout.nValue.GetAmount()));
|
||||
} else {
|
||||
p.pushKV("value", "<confidential>");
|
||||
}
|
||||
p.pushKV("scriptPubKey", o_script_pub_key);
|
||||
in.pushKV("prevout", p);
|
||||
}
|
||||
}
|
||||
in.pushKV("sequence", (int64_t)txin.nSequence);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue