mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
Structures for self-descriptive directory nodes.
This commit is contained in:
@@ -262,7 +262,7 @@ public:
|
||||
// Directories are doubly linked lists of nodes.
|
||||
|
||||
// Given a directory root and and index compute the index of a node.
|
||||
static uint256 getDirNodeIndex(const uint256& uDirRoot, const uint64 uNodeIndex=0);
|
||||
static uint256 getDirNodeIndex(const uint256& uDirRoot, const uint64 uNodeIndex = 0);
|
||||
|
||||
// Return a node: root or normal
|
||||
SLE::pointer getDirNode(LedgerStateParms& parms, const uint256& uNodeIndex);
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
// Quality
|
||||
//
|
||||
|
||||
static uint256 getQualityIndex(const uint256& uBase, const uint64 uNodeDir=0);
|
||||
static uint256 getQualityIndex(const uint256& uBase, const uint64 uNodeDir = 0);
|
||||
static uint256 getQualityNext(const uint256& uBase);
|
||||
static uint64 getQuality(const uint256& uBase);
|
||||
|
||||
|
||||
@@ -46,6 +46,12 @@ static bool LEFInit()
|
||||
;
|
||||
|
||||
DECLARE_LEF(DirectoryNode, ltDIR_NODE)
|
||||
<< SOElement(sfOwner, SOE_OPTIONAL) // for owner directories
|
||||
<< SOElement(sfTakerPaysCurrency, SOE_OPTIONAL) // for order book directories
|
||||
<< SOElement(sfTakerPaysIssuer, SOE_OPTIONAL) // for order book directories
|
||||
<< SOElement(sfTakerGetsCurrency, SOE_OPTIONAL) // for order book directories
|
||||
<< SOElement(sfTakerGetsIssuer, SOE_OPTIONAL) // for order book directories
|
||||
<< SOElement(sfExhangeRate, SOE_OPTIONAL) // for order book directories
|
||||
<< SOElement(sfIndexes, SOE_REQUIRED)
|
||||
<< SOElement(sfRootIndex, SOE_REQUIRED)
|
||||
<< SOElement(sfIndexNext, SOE_OPTIONAL)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
FIELD(BookNode, UINT64, 3)
|
||||
FIELD(OwnerNode, UINT64, 4)
|
||||
FIELD(BaseFee, UINT64, 5)
|
||||
FIELD(ExchangeRate, UINT64, 6)
|
||||
|
||||
// 128-bit
|
||||
FIELD(EmailHash, HASH128, 1)
|
||||
@@ -84,6 +85,12 @@
|
||||
FIELD(InvoiceID, HASH256, 17)
|
||||
FIELD(Nickname, HASH256, 18)
|
||||
|
||||
// 160-bit (common)
|
||||
FIELD(TakerPaysCurrency, HASH160, 1)
|
||||
FIELD(TakerPaysIssuer, HASH160, 2)
|
||||
FIELD(TakerGetsCurrency, HASH160, 3)
|
||||
FIELD(TakerGetsIssuer, HASH160, 4)
|
||||
|
||||
// currency amount (common)
|
||||
FIELD(Amount, AMOUNT, 1)
|
||||
FIELD(Balance, AMOUNT, 2)
|
||||
|
||||
Reference in New Issue
Block a user