mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix 'tx' output format. Begin supporting a binary output format.
This adds support for binary in 'tx' and 'account_tx' commands. https://ripple.com/wiki/FormatChange
This commit is contained in:
@@ -190,12 +190,19 @@ void SerializedTransaction::setSourceAccount(const RippleAddress& naSource)
|
||||
setFieldAccount(sfAccount, naSource);
|
||||
}
|
||||
|
||||
Json::Value SerializedTransaction::getJson(int options) const
|
||||
Json::Value SerializedTransaction::getJson(int options, bool binary) const
|
||||
{
|
||||
if (binary)
|
||||
{
|
||||
Json::Value ret;
|
||||
Serializer s = STObject::getSerializer();
|
||||
ret["tx"] = strHex(s.peekData());
|
||||
ret["hash"] = getTransactionID().GetHex();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Json::Value ret = STObject::getJson(0);
|
||||
|
||||
ret["hash"] = getTransactionID().GetHex();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user