diff --git a/.github/workflows/contract.yml b/.github/workflows/contract.yml index c46a67ec..60dd7328 100644 --- a/.github/workflows/contract.yml +++ b/.github/workflows/contract.yml @@ -70,7 +70,7 @@ jobs: owner: AntelopeIO repo: spring file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb' - target: '1' + target: 'main' prereleases: false artifact-name: antelope-spring-dev-ubuntu22-amd64 container-package: antelope-spring-experimental-binaries diff --git a/tests/basic_evm_tester.hpp b/tests/basic_evm_tester.hpp index 07fb689f..481ede80 100644 --- a/tests/basic_evm_tester.hpp +++ b/tests/basic_evm_tester.hpp @@ -343,9 +343,9 @@ class evm_validating_tester : public testing::base_tester { signed_block_ptr produce_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms), bool no_throw = false )override { auto produce_block_result = _produce_block(skip_time, false, no_throw); auto sb = produce_block_result.block; - auto bhf = validating_node->create_block_handle_future( sb->calculate_id(), sb ); - struct controller::block_report br; - validating_node->push_block(br, bhf.get(), forked_callback_t{}, trx_meta_cache_lookup{} ); + auto [best_head, obh] = validating_node->accept_block( sb->calculate_id(), sb ); + EOS_ASSERT(obh, unlinkable_block_exception, "block did not link ${b}", ("b", sb->calculate_id())); + validating_node->apply_blocks( {}, trx_meta_cache_lookup{} ); return sb; } @@ -361,17 +361,17 @@ class evm_validating_tester : public testing::base_tester { } void validate_push_block(const signed_block_ptr& sb) { - auto bhf = validating_node->create_block_handle_future( sb->calculate_id(), sb ); - struct controller::block_report br; - validating_node->push_block(br, bhf.get(), forked_callback_t{}, trx_meta_cache_lookup{} ); + auto [best_head, obh] = validating_node->accept_block( sb->calculate_id(), sb ); + EOS_ASSERT(obh, unlinkable_block_exception, "block did not link ${b}", ("b", sb->calculate_id())); + validating_node->apply_blocks( {}, trx_meta_cache_lookup{} ); } signed_block_ptr produce_empty_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms) )override { unapplied_transactions.add_aborted( control->abort_block() ); auto sb = _produce_block(skip_time, true); - auto bhf = validating_node->create_block_handle_future( sb->calculate_id(), sb ); - struct controller::block_report br; - validating_node->push_block(br, bhf.get(), forked_callback_t{}, trx_meta_cache_lookup{} ); + auto [best_head, obh] = validating_node->accept_block( sb->calculate_id(), sb ); + EOS_ASSERT(obh, unlinkable_block_exception, "block did not link ${b}", ("b", sb->calculate_id())); + validating_node->apply_blocks( {}, trx_meta_cache_lookup{} ); return sb; }