Пример #1
0
    Impl (DigestAwareReadView const& ledger)
    {
        auto const k = keylet::amendments();
        digest_ = ledger.digest(k.key);
        if (! digest_)
            return;
        auto const sle = ledger.read(k);
        if (! sle)
        {
            // LogicError() ?
            return;
        }

        for (auto const& item :
                sle->getFieldV256(sfAmendments))
            set_.insert(item);
    }
Пример #2
0
    explicit Impl(
        DigestAwareReadView const& ledger,
            std::unordered_set<uint256, beast::uhash<>> const& presets)
        : presets_(presets)
    {
        auto const k = keylet::amendments();
        digest_ = ledger.digest(k.key);
        if (! digest_)
            return;
        auto const sle = ledger.read(k);
        if (! sle)
        {
            // LogicError() ?
            return;
        }

        for (auto const& item :
                sle->getFieldV256(sfAmendments))
            set_.insert(item);
    }