Skip to content

Commit

Permalink
state history plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tbfleming committed Nov 20, 2018
1 parent 4c9004c commit 50aad47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ namespace eosio {
* char[] deltas
*/

// todo: look into switching this to serialization instead of memcpy
// todo: consider reworking versioning
// todo: consider dropping block_num since it's included in block_id
struct state_history_log_header {
uint32_t block_num = 0;
chain::block_id_type block_id;
Expand Down
4 changes: 2 additions & 2 deletions plugins/state_history_plugin/state_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ struct state_history_plugin_impl : std::enable_shared_from_this<state_history_pl
continue;
auto id = plugin->get_block_id(cp.block_num);
if (!id || *id != cp.block_id)
req.start_block_num = cp.block_num;
req.start_block_num = std::min(req.start_block_num, cp.block_num);
}
req.have_positions.clear();
current_request = req;
Expand Down Expand Up @@ -508,7 +508,7 @@ void state_history_plugin::set_program_options(options_description& cli, options
auto options = cfg.add_options();
options("state-history-dir", bpo::value<bfs::path>()->default_value("state-history"),
"the location of the state-history directory (absolute path or relative to application data dir)");
options("delete-state-history", bpo::bool_switch()->default_value(false), "clear state history files");
cli.add_options()("delete-state-history", bpo::bool_switch()->default_value(false), "clear state history files");
options("trace-history", bpo::bool_switch()->default_value(false), "enable trace history");
options("chain-state-history", bpo::bool_switch()->default_value(false), "enable chain state history");
options("state-history-endpoint", bpo::value<string>()->default_value("0.0.0.0:8080"),
Expand Down

0 comments on commit 50aad47

Please sign in to comment.