New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
streamlined the use of include_hex #12541
Conversation
ScriptPubKeyToUniv is using include_hex now the printout of scriptsig is now also in a include_hex condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test could be added showing that decoderawtransaction
response doesn't contains the hex fields.
Requires release note.
@@ -174,7 +174,8 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, | |||
in.pushKV("vout", (int64_t)txin.prevout.n); | |||
UniValue o(UniValue::VOBJ); | |||
o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true)); | |||
o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing keys can break existing software. Not sure if this needs deprecation a flag.
{ | ||
txnouttype type; | ||
std::vector<CTxDestination> addresses; | ||
int nRequired; | ||
|
||
out.pushKV("asm", ScriptToAsmStr(scriptPubKey)); | ||
if (fIncludeHex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, since you are updating style here, add { }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in the second commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing here.
Here bitcoin/src/rpc/rawtransaction.cpp Line 517 in 228b086
include_hex is set to false .
|
ScriptPubKeyToUniv is using include_hex now instead of 'true'
the printout of scriptsig is now also in a include_hex condition