diff --git a/console/executor_store.cpp b/console/executor_store.cpp index 25b06691..ad7268f3 100644 --- a/console/executor_store.cpp +++ b/console/executor_store.cpp @@ -116,7 +116,7 @@ code executor::open_store_coded(bool details) return ec; } - logger(BN_DATABASE_STARTED); + logger(store_.is_dirty() ? BN_DATABASE_STARTED_DIRTY : BN_DATABASE_STARTED); return error::success; } diff --git a/console/localize.hpp b/console/localize.hpp index db5b367e..c9121abb 100644 --- a/console/localize.hpp +++ b/console/localize.hpp @@ -171,7 +171,9 @@ namespace node { #define BN_NODE_INTERRUPT \ "Press CTRL-C to stop the node." #define BN_DATABASE_STARTED \ - "Database is started." + "Database is started (clean)." +#define BN_DATABASE_STARTED_DIRTY \ + "Database is started (dirty)." #define BN_NETWORK_STARTING \ "Please wait while network is starting..." #define BN_NODE_START_FAIL \ diff --git a/src/full_node.cpp b/src/full_node.cpp index 8fc3b548..3c9b59a1 100644 --- a/src/full_node.cpp +++ b/src/full_node.cpp @@ -432,6 +432,10 @@ code full_node::reload(const store::event_handler& handler) NOEXCEPT const auto start = logger::now(); suspend(error::store_reload); + + // This will set the store's dirty flag causing increased read activity for + // set(tx/block) due to activation of duplicate detection. The store is + // is however always in a dirty state after startup with non-empty tables. const auto ec = query_.reload([&](auto event, auto table) NOEXCEPT { // Suspend channels that missed previous suspend events.