#47 Fixing bucket_object serialization
This commit is contained in:
parent
bf9f81a21d
commit
16e90c53ac
2 changed files with 8 additions and 7 deletions
|
|
@ -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) )
|
||||
|
||||
|
|
|
|||
|
|
@ -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>( [&]( bucket_object& b ){
|
||||
db.create<bucket_object>( [&]( bucket_object& b ){
|
||||
b.key = key;
|
||||
b.quote_volume += trade_price.quote.amount;
|
||||
b.base_volume += trade_price.base.amount;
|
||||
|
|
|
|||
Loading…
Reference in a new issue