Handler account_currencies (#524)

Fixes #525
This commit is contained in:
cyan317
2023-02-27 09:17:51 +00:00
committed by GitHub
parent 7d4e5ff0bd
commit a3211f4458
10 changed files with 592 additions and 19 deletions

View File

@@ -606,8 +606,10 @@ getLedgerInfoFromHashOrSeq(
RPC::Status{RPC::RippledError::rpcLGR_NOT_FOUND, "ledgerNotFound"};
if (ledgerHash)
{
lgrInfo =
backend.fetchLedgerByHash(ripple::uint256{*ledgerHash}, yield);
// invoke uint256's constructor to parse the hex string , instead of
// copying buffer
ripple::uint256 ledgerHash256{std::string_view(*ledgerHash)};
lgrInfo = backend.fetchLedgerByHash(ledgerHash256, yield);
if (!lgrInfo || lgrInfo->seq > maxSeq)
return err;