Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] Backport: Use new appbase method caller #671

Merged
merged 4 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/appbase
3 changes: 2 additions & 1 deletion plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,8 @@ fc::variant read_only::get_block_header_state(const get_block_header_state_param

void read_write::push_block(read_write::push_block_params&& params, next_function<read_write::push_block_results> next) {
try {
app().get_method<incoming::methods::block_sync>()(std::make_shared<signed_block>(std::move(params)), {});
app().get_method<incoming::methods::block_sync>()(std::make_shared<signed_block>( std::move( params ) ), std::optional<block_id_type>{});
next(read_write::push_block_results{});
} catch ( boost::interprocess::bad_alloc& ) {
chain_plugin::handle_db_exhaustion();
} catch ( const std::bad_alloc& ) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/producer_plugin/test/test_trx_full.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ BOOST_AUTO_TEST_CASE(producer) {
dlog( "posting ${id}", ("id", ptrx->id()) );
app().post( priority::low, [ptrx, &next_calls, &num_posts, &trace_with_except, &trx_match, &trxs]() {
++num_posts;
bool return_failure_traces = false; // 2.2.x+ = num_posts % 2 == 0;
bool return_failure_traces = num_posts % 2; // 2.2.x+ = num_posts % 2 == 0;
app().get_method<plugin_interface::incoming::methods::transaction_async>()(ptrx,
false, // persist_until_expiried
false, // read_only
false, // return_failure_traces
return_failure_traces, // return_failure_traces
[ptrx, &next_calls, &trace_with_except, &trx_match, &trxs, return_failure_traces]
(const std::variant<fc::exception_ptr, transaction_trace_ptr>& result) {
if( !std::holds_alternative<fc::exception_ptr>( result ) && !std::get<chain::transaction_trace_ptr>( result )->except ) {
Expand Down