mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Add option to return non-segwit serialization via rpc
This commit is contained in:
parent
7d5d44969b
commit
bc7ff8db99
9 changed files with 40 additions and 9 deletions
|
|
@ -116,9 +116,9 @@ string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode)
|
|||
return str;
|
||||
}
|
||||
|
||||
string EncodeHexTx(const CTransaction& tx)
|
||||
string EncodeHexTx(const CTransaction& tx, const int serialFlags)
|
||||
{
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | serialFlags);
|
||||
ssTx << tx;
|
||||
return HexStr(ssTx.begin(), ssTx.end());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue