Skip to content

Commit

Permalink
Correctly return legacy_signed_block in condenser_api steemit#2116
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandeberg committed Feb 13, 2018
1 parent 4607ea6 commit f0d3171
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion libraries/plugins/apis/condenser_api/condenser_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,13 @@ namespace detail
{
CHECK_ARG_SIZE( 1 )
FC_ASSERT( _block_api, "block_api_plugin not enabled." );
return _block_api->get_block( { args[0].as< uint32_t >() } ).block;
get_block_return result;
auto b = _block_api->get_block( { args[0].as< uint32_t >() } ).block;
if( b )
result = legacy_signed_block( *b );
return result;
}
DEFINE_API_IMPL( condenser_api_impl, get_ops_in_block )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ DEFINE_API_ARGS( get_trending_tags, vector< variant >, ve
DEFINE_API_ARGS( get_state, vector< variant >, state )
DEFINE_API_ARGS( get_active_witnesses, vector< variant >, vector< account_name_type > )
DEFINE_API_ARGS( get_block_header, vector< variant >, optional< block_header > )
DEFINE_API_ARGS( get_block, vector< variant >, optional< block_api::api_signed_block_object > )
DEFINE_API_ARGS( get_block, vector< variant >, optional< legacy_signed_block > )
DEFINE_API_ARGS( get_ops_in_block, vector< variant >, vector< api_operation_object > )
DEFINE_API_ARGS( get_config, vector< variant >, fc::variant_object )
DEFINE_API_ARGS( get_dynamic_global_properties, vector< variant >, extended_dynamic_global_properties )
Expand Down

0 comments on commit f0d3171

Please sign in to comment.