mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
refactor: minor styling, prefer snake case and same line if
This commit is contained in:
parent
d64deac7b8
commit
2b1fdc2c6c
3 changed files with 7 additions and 8 deletions
|
|
@ -143,16 +143,15 @@ std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags)
|
|||
|
||||
void ScriptToUniv(const CScript& script, UniValue& out)
|
||||
{
|
||||
ScriptPubKeyToUniv(script, out, /* fIncludeHex */ true, /* include_address */ false);
|
||||
ScriptPubKeyToUniv(script, out, /* include_hex */ true, /* include_address */ false);
|
||||
}
|
||||
|
||||
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex, bool include_address)
|
||||
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include_hex, bool include_address)
|
||||
{
|
||||
CTxDestination address;
|
||||
|
||||
out.pushKV("asm", ScriptToAsmStr(scriptPubKey));
|
||||
if (fIncludeHex)
|
||||
out.pushKV("hex", HexStr(scriptPubKey));
|
||||
if (include_hex) out.pushKV("hex", HexStr(scriptPubKey));
|
||||
|
||||
std::vector<std::vector<unsigned char>> solns;
|
||||
const TxoutType type{Solver(scriptPubKey, solns)};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue