20 #include <ripple/ledger/ReadView.h>
21 #include <boost/optional.hpp>
47 auto const sle = ledger.
read(k);
63 return set_.count(feature) > 0;
93 : impl_(
std::make_shared<
Impl>(ledger, presets))
98 : impl_(
std::make_shared<
Impl>(presets))
106 return impl_->enabled(
id);
113 return impl_->changed(ledger);
134 return iterator(view_, view_->slesBegin());
140 return iterator(view_, view_->slesEnd());
146 return iterator(view_, view_->slesUpperBound(key));
156 return begin() == end();
162 return iterator(view_, view_->txsBegin());
168 return iterator(view_, view_->txsEnd());
Impl(DigestAwareReadView const &ledger, std::unordered_set< uint256, beast::uhash<>> const &presets)
Keylet const & amendments() noexcept
The index of the amendment table.
std::shared_ptr< Impl const > impl_
sles_type(ReadView const &view)
Impl(std::unordered_set< uint256, beast::uhash<>> const &presets)
std::unordered_set< uint256, beast::uhash<> > const & presets_
iterator upper_bound(key_type const &key) const
bool changed(DigestAwareReadView const &ledger) const
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
virtual boost::optional< digest_type > digest(key_type const &key) const =0
Return the digest associated with the key.
ReadView that associates keys with digests.
bool changed(DigestAwareReadView const &ledger) const
Returns true if these rules don't match the ledger.
boost::optional< uint256 > digest_
bool enabled(uint256 const &id) const
Returns true if a feature is enabled.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
bool operator==(Rules const &) const
Returns true if two rule sets are identical.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool enabled(uint256 const &feature) const
std::unordered_set< uint256, hardened_hash<> > set_
Rules controlling protocol behavior.
bool operator==(Impl const &other) const
const SF_VECTOR256 sfAmendments
txs_type(ReadView const &view)