20 #ifndef RIPPLE_APP_CONSENSUSS_VALIDATIONS_H_INCLUDED
21 #define RIPPLE_APP_CONSENSUSS_VALIDATIONS_H_INCLUDED
23 #include <ripple/app/ledger/Ledger.h>
24 #include <ripple/consensus/Validations.h>
25 #include <ripple/protocol/Protocol.h>
26 #include <ripple/protocol/RippleLedgerHash.h>
27 #include <ripple/protocol/STValidation.h>
58 return val_->getLedgerHash();
72 return val_->getSignTime();
79 return val_->getSeenTime();
86 return val_->getSignerPublic();
93 return val_->getNodeID();
100 return val_->isTrusted();
112 val_->setUntrusted();
119 return val_->isFull();
Generic validations adaptor class for RCL.
std::optional< std::uint32_t > loadFee() const
Get the load fee of the validation if it exists.
NodeID nodeID() const
NodeID of validator that published the validation.
std::uint32_t LedgerIndex
A ledger index.
base_uint< 160, detail::NodeIDTag > NodeID
NodeID is a 160-bit hash representing one node.
const SF_UINT32 sfLedgerSequence
std::shared_ptr< STValidation > unwrap() const
Extract the underlying STValidation being wrapped.
std::vector< uint256 > ancestors_
NetClock::time_point now() const
Current time used to determine if validations are stale.
beast::Journal journal() const
ID id() const
The ID (hash) of the ledger.
RCLValidationsAdaptor(Application &app, beast::Journal j)
Wrapper over STValidation for generic Validation code.
Wraps a ledger instance for use in generic Validations LedgerTrie.
std::uint32_t seq() const
Validated ledger's sequence number (0 if none)
Seq seq() const
The sequence (index) of the ledger.
RCLValidatedLedger(MakeGenesis)
const SF_UINT32 sfLoadFee
std::optional< RCLValidatedLedger > acquire(LedgerHash const &id)
Attempt to acquire the ledger with given id from the network.
bool full() const
Whether the validation is full (not-partial)
ID operator[](Seq const &s) const
Lookup the ID of the ancestor ledger.
A generic endpoint for log messages.
RCLValidation(std::shared_ptr< STValidation > const &v)
Constructor.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint64_t cookie() const
Get the cookie specified in the validation (0 if not set)
uint256 ledgerID() const
Validated ledger's hash.
PublicKey key() const
Public key of validator that published the validation.
NetClock::time_point signTime() const
Validation's signing time.
std::shared_ptr< STValidation > val_
friend Seq mismatch(RCLValidatedLedger const &a, RCLValidatedLedger const &b)
Find the sequence number of the earliest mismatching ancestor.
void handleNewValidation(Application &app, std::shared_ptr< STValidation > const &val, std::string const &source)
Handle a new validation.
bool trusted() const
Whether the validation is considered trusted.
NetClock::time_point seenTime() const
Validated ledger's first seen time.