From a0a530cee8fa579beeaff2a07ecf76b655845900 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 31 Oct 2017 11:03:46 -0500 Subject: [PATCH] Add comments on existing approach #172 --- plugins/db_plugin/db_plugin.cpp | 2 +- plugins/db_plugin/include/eos/db_plugin/db_plugin.hpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/db_plugin/db_plugin.cpp b/plugins/db_plugin/db_plugin.cpp index 1ce1a317f41..eb81fee5d28 100644 --- a/plugins/db_plugin/db_plugin.cpp +++ b/plugins/db_plugin/db_plugin.cpp @@ -406,7 +406,7 @@ void db_plugin_impl::_process_irreversible_block(const signed_block& block) ++processed; } - +// For now providing some simple account processing to maintain eos_balance void db_plugin_impl::update_account(const chain::Message& msg) { using bsoncxx::builder::basic::kvp; using bsoncxx::builder::stream::document; diff --git a/plugins/db_plugin/include/eos/db_plugin/db_plugin.hpp b/plugins/db_plugin/include/eos/db_plugin/db_plugin.hpp index 9a72b47dc56..e052ccc604b 100644 --- a/plugins/db_plugin/include/eos/db_plugin/db_plugin.hpp +++ b/plugins/db_plugin/include/eos/db_plugin/db_plugin.hpp @@ -20,6 +20,14 @@ using db_plugin_impl_ptr = std::shared_ptr; * Accounts * * See data dictionary (DB Schema Definition - EOS API) for description of MongoDB schema. + * + * The goal ultimately is for all chainbase data to be mirrored in MongoDB via a delayed node processing + * irreversible blocks. Currently, only Blocks, Transactions, Messages, and Account balance it mirrored. + * Chainbase is being rewritten to be multi-threaded. Once chainbase is stable, integration directly with + * a mirror database approach can be followed removing the need for the direct processing of Blocks employed + * with this implementation. + * + * If MongoDB env not available (#ifndef MONGODB) this plugin is a no-op. */ class db_plugin : public plugin { public: