Add option to return non-segwit serialization via rpc

Github-Pull: #9194
Rebased-From: 835c75acaac004c3315395dcd7d1f193dfb9e5da
This commit is contained in:
Gregory Sanders
2016-11-20 09:54:51 -05:00
committed by Wladimir J. van der Laan
parent a710a43040
commit 21ccb9f253
9 changed files with 40 additions and 9 deletions

View File

@@ -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());
}