mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
add hook_hash to ledger_entry rpc
This commit is contained in:
@@ -281,6 +281,7 @@ JSS(have_transactions); // out: InboundLedger
|
|||||||
JSS(highest_sequence); // out: AccountInfo
|
JSS(highest_sequence); // out: AccountInfo
|
||||||
JSS(highest_ticket); // out: AccountInfo
|
JSS(highest_ticket); // out: AccountInfo
|
||||||
JSS(historical_perminute); // historical_perminute.
|
JSS(historical_perminute); // historical_perminute.
|
||||||
|
JSS(hook_hash); // in: LedgerEntry
|
||||||
JSS(hostid); // out: NetworkOPs
|
JSS(hostid); // out: NetworkOPs
|
||||||
JSS(hotwallet); // in: GatewayBalances
|
JSS(hotwallet); // in: GatewayBalances
|
||||||
JSS(id); // websocket.
|
JSS(id); // websocket.
|
||||||
|
|||||||
@@ -328,6 +328,20 @@ doLedgerEntry(RPC::JsonContext& context)
|
|||||||
*id, context.params[jss::ticket][jss::ticket_seq].asUInt());
|
*id, context.params[jss::ticket][jss::ticket_seq].asUInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (context.params.isMember(jss::hook_hash))
|
||||||
|
{
|
||||||
|
expectedType = ltHOOK_DEFINITION;
|
||||||
|
if (context.params[jss::hook_hash].isObject() ||
|
||||||
|
(!uNodeIndex.parseHex(context.params[jss::hook_hash].asString())))
|
||||||
|
{
|
||||||
|
uNodeIndex = beast::zero;
|
||||||
|
jvResult[jss::error] = "malformedRequest";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uNodeIndex = keylet::hookDefinition(uNodeIndex).key;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jvResult[jss::error] = "unknownOption";
|
jvResult[jss::error] = "unknownOption";
|
||||||
|
|||||||
Reference in New Issue
Block a user