mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-16 09:05:50 +00:00
Modernize code and clean up out-of-date or obsolete comments:
- Remove references to nodestore ledger index. This was removed
in f946d7b447.
This commit is contained in:
@@ -639,7 +639,6 @@ RCLConsensus::Adaptor::doAccept(
|
|||||||
|
|
||||||
for (auto const& p : rawCloseTimes.peers)
|
for (auto const& p : rawCloseTimes.peers)
|
||||||
{
|
{
|
||||||
// FIXME: Use median, not average
|
|
||||||
JLOG(j_.info())
|
JLOG(j_.info())
|
||||||
<< std::to_string(p.second) << " time votes for "
|
<< std::to_string(p.second) << " time votes for "
|
||||||
<< std::to_string(p.first.time_since_epoch().count());
|
<< std::to_string(p.first.time_since_epoch().count());
|
||||||
|
|||||||
@@ -194,8 +194,6 @@ class NetworkOPsImp final
|
|||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// VFALCO TODO Make LedgerMaster a SharedPtr or a reference.
|
|
||||||
//
|
|
||||||
NetworkOPsImp (Application& app, NetworkOPs::clock_type& clock,
|
NetworkOPsImp (Application& app, NetworkOPs::clock_type& clock,
|
||||||
bool standalone, std::size_t minPeerCount, bool start_valid,
|
bool standalone, std::size_t minPeerCount, bool start_valid,
|
||||||
JobQueue& job_queue, LedgerMaster& ledgerMaster, Stoppable& parent,
|
JobQueue& job_queue, LedgerMaster& ledgerMaster, Stoppable& parent,
|
||||||
@@ -323,9 +321,6 @@ public:
|
|||||||
|
|
||||||
// Network state machine.
|
// Network state machine.
|
||||||
|
|
||||||
// VFALCO TODO Try to make all these private since they seem to be...private
|
|
||||||
//
|
|
||||||
|
|
||||||
// Used for the "jump" case.
|
// Used for the "jump" case.
|
||||||
private:
|
private:
|
||||||
void switchLastClosedLedger (
|
void switchLastClosedLedger (
|
||||||
|
|||||||
@@ -34,13 +34,12 @@ enum NodeObjectType
|
|||||||
{
|
{
|
||||||
hotUNKNOWN = 0,
|
hotUNKNOWN = 0,
|
||||||
hotLEDGER = 1,
|
hotLEDGER = 1,
|
||||||
//hotTRANSACTION = 2 // Not used
|
|
||||||
hotACCOUNT_NODE = 3,
|
hotACCOUNT_NODE = 3,
|
||||||
hotTRANSACTION_NODE = 4
|
hotTRANSACTION_NODE = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A simple object that the Ledger uses to store entries.
|
/** A simple object that the Ledger uses to store entries.
|
||||||
NodeObjects are comprised of a type, a hash, a ledger index and a blob.
|
NodeObjects are comprised of a type, a hash, and a blob.
|
||||||
They can be uniquely identified by the hash, which is a half-SHA512 of
|
They can be uniquely identified by the hash, which is a half-SHA512 of
|
||||||
the blob. The blob is a variable length block of serialized data. The
|
the blob. The blob is a variable length block of serialized data. The
|
||||||
type identifies what the blob contains.
|
type identifies what the blob contains.
|
||||||
@@ -53,16 +52,7 @@ class NodeObject : public CountedObject <NodeObject>
|
|||||||
public:
|
public:
|
||||||
static char const* getCountedObjectName () { return "NodeObject"; }
|
static char const* getCountedObjectName () { return "NodeObject"; }
|
||||||
|
|
||||||
enum
|
static constexpr std::size_t keyBytes = 32;
|
||||||
{
|
|
||||||
/** Size of the fixed keys, in bytes.
|
|
||||||
|
|
||||||
We use a 256-bit hash for the keys.
|
|
||||||
|
|
||||||
@see NodeObject
|
|
||||||
*/
|
|
||||||
keyBytes = 32,
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This hack is used to make the constructor effectively private
|
// This hack is used to make the constructor effectively private
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
A `NodeObject` is a simple object that the Ledger uses to store entries. It is
|
A `NodeObject` is a simple object that the Ledger uses to store entries. It is
|
||||||
comprised of a type, a hash, a ledger index and a blob. It can be uniquely
|
comprised of a type, a hash and a blob. It can be uniquely
|
||||||
identified by the hash, which is a 256 bit hash of the blob. The blob is a
|
identified by the hash, which is a 256 bit hash of the blob. The blob is a
|
||||||
variable length block of serialized data. The type identifies what the blob
|
variable length block of serialized data. The type identifies what the blob
|
||||||
contains. The fields are as follows:
|
contains. The fields are as follows:
|
||||||
@@ -33,19 +33,13 @@ contains. The fields are as follows:
|
|||||||
|
|
||||||
A 256-bit hash of the blob.
|
A 256-bit hash of the blob.
|
||||||
|
|
||||||
* `mLedgerIndex`
|
|
||||||
|
|
||||||
An unsigned integer that uniquely identifies the ledger in which this
|
|
||||||
NodeObject appears.
|
|
||||||
|
|
||||||
* `mData`
|
* `mData`
|
||||||
|
|
||||||
A blob containing the payload. Stored in the following format.
|
A blob containing the payload. Stored in the following format.
|
||||||
|
|
||||||
|Byte | | |
|
|Byte | | |
|
||||||
|:------|:--------------------|:-------------------------|
|
|:------|:--------------------|:-------------------------|
|
||||||
|0...3 |ledger index |32-bit big endian integer |
|
|0...7 |unused | |
|
||||||
|4...7 |reserved ledger index|32-bit big endian integer |
|
|
||||||
|8 |type |NodeObjectType enumeration|
|
|8 |type |NodeObjectType enumeration|
|
||||||
|9...end|data |body of the object data |
|
|9...end|data |body of the object data |
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ DecodedBlob::DecodedBlob (void const* key, void const* value, int valueBytes)
|
|||||||
|
|
||||||
Bytes
|
Bytes
|
||||||
|
|
||||||
0...3 LedgerIndex 32-bit big endian integer
|
0...7 Unused
|
||||||
4...7 Unused? An unused copy of the LedgerIndex
|
|
||||||
8 char One of NodeObjectType
|
8 char One of NodeObjectType
|
||||||
9...end The body of the object data
|
9...end The body of the object data
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user