コード例 #1
0
ファイル: Manager.cpp プロジェクト: BitHighlander/rippled
    void onWrite (beast::PropertyStream::Map& map)
    {
        Context::Scope scope (m_context);

        map ["trusted"] = m_logic.getChosenSize();
        {
            beast::PropertyStream::Set items ("sources", map);
            for (auto const& entry : m_logic.getSources())
            {
                items.add (entry.source->to_string());
            }
        }

        {
            beast::PropertyStream::Set items ("validators", map);
            for (auto const& entry : m_logic.getValidators())
            {
                RipplePublicKey const& publicKey (entry.first);
                Validator const& validator (entry.second);
                beast::PropertyStream::Map item (items);
                item["public_key"] = publicKey.to_string();
                validator.count().onWrite (item);
            }
        }
    }