Add option to return non-segwit serialization via rpc
This commit is contained in:
committed by
lateminer
parent
552ef391d7
commit
ab2332461b
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user