From f371f98cd40979ffe5905d1bb0d7b679be153995 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Mon, 27 Jul 2015 08:19:27 -0400 Subject: [PATCH] Fix #203 - market history plugin config supports multiple buckets --- .../plugins/market_history/market_history_plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/plugins/market_history/market_history_plugin.cpp b/libraries/plugins/market_history/market_history_plugin.cpp index 260d4c7e..d8e941d1 100644 --- a/libraries/plugins/market_history/market_history_plugin.cpp +++ b/libraries/plugins/market_history/market_history_plugin.cpp @@ -206,8 +206,8 @@ void market_history_plugin::plugin_set_program_options( ) { cli.add_options() - ("bucket-size", boost::program_options::value>()->composing()->multitoken(), - "Track market history by grouping orders into buckets of equal size measured in seconds, may specify more than one bucket size") + ("bucket-size", boost::program_options::value()->default_value("[15,60,300,3600,86400]"), + "Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers") ("history-per-size", boost::program_options::value()->default_value(1000), "How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)") ; @@ -221,8 +221,8 @@ void market_history_plugin::plugin_initialize(const boost::program_options::vari if( options.count( "bucket-size" ) ) { - const std::vector& buckets = options["bucket-size"].as>(); - for( auto o : buckets ) my->_tracked_buckets.insert(o); + const std::string& buckets = options["bucket-size"].as(); + my->_tracked_buckets = fc::json::from_string(buckets).as>(); } if( options.count( "history-per-size" ) ) my->_maximum_history_per_bucket_size = options["history-per-size"].as();