mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -1325,4 +1325,21 @@ getNFTID(boost::json::object const& request)
|
||||
return tokenid;
|
||||
}
|
||||
|
||||
bool
|
||||
isAmendmentEnabled(
|
||||
std::shared_ptr<Backend::BackendInterface const> const& backend,
|
||||
boost::asio::yield_context yield,
|
||||
uint32_t seq,
|
||||
ripple::uint256 amendmentId)
|
||||
{
|
||||
// the amendments should always be present in ledger
|
||||
auto const& amendments = backend->fetchLedgerObject(ripple::keylet::amendments().key, seq, yield);
|
||||
|
||||
ripple::SLE amendmentsSLE{
|
||||
ripple::SerialIter{amendments->data(), amendments->size()}, ripple::keylet::amendments().key};
|
||||
|
||||
auto const listAmendments = amendmentsSLE.getFieldV256(ripple::sfAmendments);
|
||||
return std::find(listAmendments.begin(), listAmendments.end(), amendmentId) != listAmendments.end();
|
||||
}
|
||||
|
||||
} // namespace RPC
|
||||
|
||||
Reference in New Issue
Block a user