1#ifndef XRPL_APP_MISC_AMENDMENTTABLE_H_INCLUDED 
    2#define XRPL_APP_MISC_AMENDMENTTABLE_H_INCLUDED 
    4#include <xrpld/app/ledger/Ledger.h> 
    5#include <xrpld/core/ConfigSections.h> 
    7#include <xrpl/protocol/Feature.h> 
    8#include <xrpl/protocol/Protocol.h> 
    9#include <xrpl/protocol/STValidation.h> 
   79                lastValidatedLedger->seq(),
 
 
  137            lastClosedLedger->rules(),
 
  138            lastClosedLedger->parentCloseTime(),
 
  144        for (
auto const& it : actions)
 
  148                [&it, seq = lastClosedLedger->seq() + 1](
auto& obj) {
 
  149                    obj.setAccountID(sfAccount, AccountID());
 
  150                    obj.setFieldH256(sfAmendment, it.first);
 
  151                    obj.setFieldU32(sfLedgerSequence, seq);
 
  154                        obj.setFieldU32(sfFlags, it.second);
 
  160            JLOG(j.
debug()) << 
"Amendments: Adding pseudo-transaction: " 
  164            initialPosition->addGiveItem(
 
 
 
  176    Section 
const& enabled,
 
  177    Section 
const& vetoed,
 
A generic endpoint for log messages.
 
The amendment table stores the list of enabled and potential amendments.
 
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)
 
virtual void trustChanged(hash_set< PublicKey > const &allTrusted)=0
 
virtual Json::Value getJson(uint256 const &amendment, bool isAdmin) const =0
Returns a Json::objectValue.
 
virtual std::vector< uint256 > doValidation(std::set< uint256 > const &enabled) const =0
 
virtual void doValidatedLedger(LedgerIndex ledgerSeq, std::set< uint256 > const &enabled, majorityAmendments_t const &majority)=0
 
virtual std::optional< NetClock::time_point > firstUnsupportedExpected() const =0
 
virtual std::map< uint256, std::uint32_t > 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)=0
 
virtual bool veto(uint256 const &amendment)=0
 
virtual std::vector< uint256 > getDesired() const =0
 
virtual bool isSupported(uint256 const &amendment) const =0
 
virtual Json::Value getJson(bool isAdmin) 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 sup...
 
void doValidatedLedger(std::shared_ptr< ReadView const > const &lastValidatedLedger)
Called when a new fully-validated ledger is accepted.
 
virtual bool enable(uint256 const &amendment)=0
 
virtual uint256 find(std::string const &name) const =0
 
virtual bool unVeto(uint256 const &amendment)=0
 
virtual bool isEnabled(uint256 const &amendment) const =0
 
virtual bool needValidatedLedger(LedgerIndex seq) const =0
Called to determine whether the amendment logic needs to process a new validated ledger.
 
virtual ~AmendmentTable()=default
 
Rules controlling protocol behavior.
 
void add(Serializer &s) const override
 
uint256 getTransactionID() const
 
Slice slice() const noexcept
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
bool isAdmin(Port const &port, Json::Value const ¶ms, beast::IP::Address const &remoteIp)
 
std::set< uint256 > getEnabledAmendments(ReadView const &view)
 
std::string strHex(FwdIt begin, FwdIt end)
 
boost::intrusive_ptr< SHAMapItem > make_shamapitem(uint256 const &tag, Slice data)
 
majorityAmendments_t getMajorityAmendments(ReadView const &view)
 
std::unique_ptr< AmendmentTable > make_AmendmentTable(Application &app, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal)
 
FeatureInfo(std::string const &n, uint256 const &f, VoteBehavior v)