mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Incremental improvements to path finding memory usage:
* Abort background path finding when closed or disconnected * Exit pathfinding job thread if there are no requests left * Don't bother creating the path find job if there are no requests * Refactor to remove circular dependency between InfoSub and PathRequest
This commit is contained in:
committed by
Nik Bougalis
parent
4d5459d041
commit
e7e672c3f8
@@ -20,6 +20,7 @@
|
||||
#ifndef RIPPLE_PROTOCOL_STPATHSET_H_INCLUDED
|
||||
#define RIPPLE_PROTOCOL_STPATHSET_H_INCLUDED
|
||||
|
||||
#include <ripple/basics/CountedObject.h>
|
||||
#include <ripple/json/json_value.h>
|
||||
#include <ripple/protocol/SField.h>
|
||||
#include <ripple/protocol/STBase.h>
|
||||
@@ -30,7 +31,7 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
class STPathElement
|
||||
class STPathElement final : public CountedObject<STPathElement>
|
||||
{
|
||||
unsigned int mType;
|
||||
AccountID mAccountID;
|
||||
@@ -114,7 +115,7 @@ private:
|
||||
get_hash(STPathElement const& element);
|
||||
};
|
||||
|
||||
class STPath
|
||||
class STPath final : public CountedObject<STPath>
|
||||
{
|
||||
std::vector<STPathElement> mPath;
|
||||
|
||||
@@ -172,7 +173,7 @@ public:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// A set of zero or more payment paths
|
||||
class STPathSet final : public STBase
|
||||
class STPathSet final : public STBase, public CountedObject<STPathSet>
|
||||
{
|
||||
std::vector<STPath> value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user