20 #include <ripple/ledger/ReadView.h>
21 #include <boost/optional.hpp>
49 auto const sle = ledger.
read(k);
56 for (
auto const& item :
66 return set_.count(feature) > 0;
97 : impl_(
std::make_shared<
Impl>(ledger, presets))
102 : impl_(
std::make_shared<
Impl>(presets))
110 return impl_->enabled(
id);
117 return impl_->changed(ledger);
133 : ReadViewFwdRange(view)
141 return iterator(view_, view_->slesBegin());
149 end_ = iterator(view_, view_->slesEnd());
157 return iterator(view_, view_->slesUpperBound(key));
162 : ReadViewFwdRange(view)
169 return begin() == end();
176 return iterator(view_, view_->txsBegin());
184 end_ = iterator(view_, view_->txsEnd());
Impl(DigestAwareReadView const &ledger, std::unordered_set< uint256, beast::uhash<>> const &presets)
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.
iterator const & end() const
Seed functor once per construction.
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.
iterator const & end() const
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.
static const amendments_t amendments
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.
const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")
bool operator==(Impl const &other) const
txs_type(ReadView const &view)