Skip to content

Commit

Permalink
fix blockid in state
Browse files Browse the repository at this point in the history
  • Loading branch information
coodi committed Feb 15, 2019
1 parent 64c9070 commit 2a105b5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions uos_blocks_exporter/uos_blocks_exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ namespace uos_plugins{
void uos_BE_impl::applied_transaction_catcher(const eosio::chain::transaction_trace_ptr &att) {
fc::variants actions;
try{
fc::variant temp = att->producer_block_id;
last_state.mongo_blockid = temp.as_string();
last_state.mongo_blocknum = att->block_num;
mongo->set_last_state(last_state);
if(att->producer_block_id) {
last_state.mongo_blockid = fc::variant(att->producer_block_id).as_string();
last_state.mongo_blocknum = att->block_num;
mongo->set_last_state(last_state);
}
}
catch (mongocxx::exception &ex){
elog(ex.what());
Expand Down

1 comment on commit 2a105b5

@coodi
Copy link
Member Author

@coodi coodi commented on 2a105b5 Feb 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2

Please sign in to comment.