diff --git a/libraries/plugins/market_history/include/graphene/market_history/market_history_plugin.hpp b/libraries/plugins/market_history/include/graphene/market_history/market_history_plugin.hpp index 201cf3a1..43639b25 100644 --- a/libraries/plugins/market_history/include/graphene/market_history/market_history_plugin.hpp +++ b/libraries/plugins/market_history/include/graphene/market_history/market_history_plugin.hpp @@ -128,10 +128,11 @@ class market_history_plugin : public graphene::app::plugin } } //graphene::market_history FC_REFLECT( graphene::market_history::bucket_key, (base)(quote)(seconds)(open) ) -FC_REFLECT( graphene::market_history::bucket_object, (key) - (high_base)(high_quote) - (low_base)(low_quote) - (open_base)(open_quote) - (close_base)(close_quote) - (base_volume)(quote_volume) ) +FC_REFLECT_DERIVED( graphene::market_history::bucket_object, (graphene::db::object), + (key) + (high_base)(high_quote) + (low_base)(low_quote) + (open_base)(open_quote) + (close_base)(close_quote) + (base_volume)(quote_volume) ) diff --git a/libraries/plugins/market_history/market_history_plugin.cpp b/libraries/plugins/market_history/market_history_plugin.cpp index b2c87f3c..f5662021 100644 --- a/libraries/plugins/market_history/market_history_plugin.cpp +++ b/libraries/plugins/market_history/market_history_plugin.cpp @@ -106,7 +106,7 @@ struct operation_process_fill_order auto itr = by_key_idx.find( key ); if( itr == by_key_idx.end() ) { // create new bucket - const auto& obj = db.create( [&]( bucket_object& b ){ + db.create( [&]( bucket_object& b ){ b.key = key; b.quote_volume += trade_price.quote.amount; b.base_volume += trade_price.base.amount;