rippled
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
xrpl::AmendmentTable Class Referenceabstract

The amendment table stores the list of enabled and potential amendments. More...

#include <AmendmentTable.h>

Inheritance diagram for xrpl::AmendmentTable:
Inheritance graph
[legend]

Classes

struct  FeatureInfo
 

Public Member Functions

virtual ~AmendmentTable ()=default
 
virtual uint256 find (std::string const &name) const =0
 
virtual bool veto (uint256 const &amendment)=0
 
virtual bool unVeto (uint256 const &amendment)=0
 
virtual bool enable (uint256 const &amendment)=0
 
virtual bool isEnabled (uint256 const &amendment) const =0
 
virtual bool isSupported (uint256 const &amendment) const =0
 
virtual bool hasUnsupportedEnabled () const =0
 returns true if one or more amendments on the network have been enabled that this server does not support
 
virtual std::optional< NetClock::time_pointfirstUnsupportedExpected () const =0
 
virtual Json::Value getJson (bool isAdmin) const =0
 
virtual Json::Value getJson (uint256 const &amendment, bool isAdmin) const =0
 Returns a Json::objectValue.
 
void doValidatedLedger (std::shared_ptr< ReadView const > const &lastValidatedLedger)
 Called when a new fully-validated ledger is accepted.
 
virtual bool needValidatedLedger (LedgerIndex seq) const =0
 Called to determine whether the amendment logic needs to process a new validated ledger.
 
virtual void doValidatedLedger (LedgerIndex ledgerSeq, std::set< uint256 > const &enabled, majorityAmendments_t const &majority)=0
 
virtual void trustChanged (hash_set< PublicKey > const &allTrusted)=0
 
virtual std::map< uint256, std::uint32_tdoVoting (Rules const &rules, NetClock::time_point closeTime, std::set< uint256 > const &enabledAmendments, majorityAmendments_t const &majorityAmendments, std::vector< std::shared_ptr< STValidation > > const &valSet)=0
 
virtual std::vector< uint256doValidation (std::set< uint256 > const &enabled) const =0
 
virtual std::vector< uint256getDesired () const =0
 
void doVoting (std::shared_ptr< ReadView const > const &lastClosedLedger, std::vector< std::shared_ptr< STValidation > > const &parentValidations, std::shared_ptr< SHAMap > const &initialPosition, beast::Journal j)
 

Detailed Description

The amendment table stores the list of enabled and potential amendments.

Individuals amendments are voted on by validators during the consensus process.

Definition at line 19 of file AmendmentTable.h.

Constructor & Destructor Documentation

◆ ~AmendmentTable()

virtual xrpl::AmendmentTable::~AmendmentTable ( )
virtualdefault

Member Function Documentation

◆ find()

virtual uint256 xrpl::AmendmentTable::find ( std::string const &  name) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ veto()

virtual bool xrpl::AmendmentTable::veto ( uint256 const &  amendment)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ unVeto()

virtual bool xrpl::AmendmentTable::unVeto ( uint256 const &  amendment)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ enable()

virtual bool xrpl::AmendmentTable::enable ( uint256 const &  amendment)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ isEnabled()

virtual bool xrpl::AmendmentTable::isEnabled ( uint256 const &  amendment) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ isSupported()

virtual bool xrpl::AmendmentTable::isSupported ( uint256 const &  amendment) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ hasUnsupportedEnabled()

virtual bool xrpl::AmendmentTable::hasUnsupportedEnabled ( ) const
pure virtual

returns true if one or more amendments on the network have been enabled that this server does not support

Returns
true if an unsupported feature is enabled on the network

Implemented in xrpl::AmendmentTableImpl.

◆ firstUnsupportedExpected()

virtual std::optional< NetClock::time_point > xrpl::AmendmentTable::firstUnsupportedExpected ( ) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ getJson() [1/2]

virtual Json::Value xrpl::AmendmentTable::getJson ( bool  isAdmin) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ getJson() [2/2]

virtual Json::Value xrpl::AmendmentTable::getJson ( uint256 const &  amendment,
bool  isAdmin 
) const
pure virtual

Returns a Json::objectValue.

Implemented in xrpl::AmendmentTableImpl.

◆ doValidatedLedger() [1/2]

void xrpl::AmendmentTable::doValidatedLedger ( std::shared_ptr< ReadView const > const &  lastValidatedLedger)

Called when a new fully-validated ledger is accepted.

Definition at line 74 of file AmendmentTable.h.

◆ needValidatedLedger()

virtual bool xrpl::AmendmentTable::needValidatedLedger ( LedgerIndex  seq) const
pure virtual

Called to determine whether the amendment logic needs to process a new validated ledger.

(If it could have changed things.)

Implemented in xrpl::AmendmentTableImpl.

◆ doValidatedLedger() [2/2]

virtual void xrpl::AmendmentTable::doValidatedLedger ( LedgerIndex  ledgerSeq,
std::set< uint256 > const &  enabled,
majorityAmendments_t const &  majority 
)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ trustChanged()

virtual void xrpl::AmendmentTable::trustChanged ( hash_set< PublicKey > const &  allTrusted)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ doVoting() [1/2]

virtual std::map< uint256, std::uint32_t > xrpl::AmendmentTable::doVoting ( Rules const &  rules,
NetClock::time_point  closeTime,
std::set< uint256 > const &  enabledAmendments,
majorityAmendments_t const &  majorityAmendments,
std::vector< std::shared_ptr< STValidation > > const &  valSet 
)
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ doValidation()

virtual std::vector< uint256 > xrpl::AmendmentTable::doValidation ( std::set< uint256 > const &  enabled) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ getDesired()

virtual std::vector< uint256 > xrpl::AmendmentTable::getDesired ( ) const
pure virtual

Implemented in xrpl::AmendmentTableImpl.

◆ doVoting() [2/2]

void xrpl::AmendmentTable::doVoting ( std::shared_ptr< ReadView const > const &  lastClosedLedger,
std::vector< std::shared_ptr< STValidation > > const &  parentValidations,
std::shared_ptr< SHAMap > const &  initialPosition,
beast::Journal  j 
)

Definition at line 129 of file AmendmentTable.h.