From 045cfbd9146a8d408ca9364f7641c194ac940a38 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Wed, 24 Jun 2015 14:44:50 -0400 Subject: [PATCH] #47 Fix crash when parsing config file --- libraries/plugins/market_history/market_history_plugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/plugins/market_history/market_history_plugin.cpp b/libraries/plugins/market_history/market_history_plugin.cpp index 25c85b79..a4ffc482 100644 --- a/libraries/plugins/market_history/market_history_plugin.cpp +++ b/libraries/plugins/market_history/market_history_plugin.cpp @@ -209,7 +209,11 @@ void market_history_plugin::plugin_initialize(const boost::program_options::vari database().applied_block.connect( [&]( const signed_block& b){ my->update_market_histories(b); } ); database().add_index< primary_index< bucket_index > >(); - LOAD_VALUE_SET(options, "bucket-size", my->_tracked_buckets, uint32_t); + if( options.count( "bucket-size" ) ) + { + const std::vector& buckets = options["bucket-size"].as>(); + for( auto o : buckets ) my->_tracked_buckets.insert(o); + } if( options.count( "history-per-size" ) ) my->_maximum_history_per_bucket_size = options["history-per-size"].as(); } FC_CAPTURE_AND_RETHROW() }