3#include <xrpld/app/main/Application.h>
4#include <xrpld/rpc/detail/AssetCache.h>
5#include <xrpld/rpc/detail/Pathfinder.h>
7#include <xrpl/basics/CountedObject.h>
8#include <xrpl/basics/UnorderedContainers.h>
9#include <xrpl/basics/base_uint.h>
10#include <xrpl/beast/utility/Journal.h>
11#include <xrpl/json/json_value.h>
12#include <xrpl/protocol/AccountID.h>
13#include <xrpl/protocol/Asset.h>
14#include <xrpl/protocol/PathAsset.h>
15#include <xrpl/protocol/Protocol.h>
16#include <xrpl/protocol/STAmount.h>
17#include <xrpl/protocol/STPathSet.h>
18#include <xrpl/resource/Consumer.h>
19#include <xrpl/server/InfoSub.h>
39#define PFR_PJ_INVALID (-1)
40#define PFR_PJ_NOCHANGE 0
167 std::chrono::steady_clock::time_point
const created_;
A generic endpoint for log messages.
std::shared_ptr< InfoSub > pointer
PathRequest(Application &app, std::shared_ptr< InfoSub > const &subscriber, int id, PathRequestManager &, beast::Journal journal)
std::recursive_mutex lock_
std::weak_ptr< PathRequest > wptr
std::chrono::steady_clock::time_point quickReply_
int parseJson(json::Value const &)
static unsigned int const kMaxPaths
bool isValid(std::shared_ptr< AssetCache > const &crCache)
PathRequestManager & owner_
std::chrono::steady_clock::time_point const created_
bool needsUpdate(bool newOnly, LedgerIndex index)
resource::Consumer & consumer_
json::Value doClose() override
std::recursive_mutex indexLock_
std::weak_ptr< InfoSub > wpSubscriber_
InfoSub::pointer getSubscriber() const
json::Value doStatus(json::Value const &) override
json::Value doUpdate(std::shared_ptr< AssetCache > const &, bool fast, std::function< bool(void)> const &continueCallback={})
std::optional< STAmount > saSendMax_
std::chrono::steady_clock::time_point fullReply_
std::set< Asset > sciSourceAssets_
std::optional< AccountID > raDstAccount_
std::optional< uint256 > domain_
std::function< void(void)> fCompletion_
std::unique_ptr< Pathfinder > const & getPathFinder(std::shared_ptr< AssetCache > const &, hash_map< PathAsset, std::unique_ptr< Pathfinder > > &, PathAsset const &, STAmount const &, int const, std::function< bool(void)> const &)
std::pair< bool, json::Value > doCreate(std::shared_ptr< AssetCache > const &, json::Value const &)
bool findPaths(std::shared_ptr< AssetCache > const &, int const, json::Value &, std::function< bool(void)> const &)
Finds and sets a PathSet in the JSON argument.
std::shared_ptr< PathRequest > pointer
std::optional< AccountID > raSrcAccount_
std::map< Asset, STPathSet > context_
An endpoint that consumes resources.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t LedgerIndex
A ledger index.
std::unordered_map< Key, Value, Hash, Pred, Allocator > hash_map