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

[1.0 -> main] dynamic chainid #756

Merged
merged 6 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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 src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ target_compile_options(evm_runtime PUBLIC --no-missing-ricardian-clause)
if (WITH_LARGE_STACK)
target_link_options(evm_runtime PUBLIC --stack-size=50000000)
else()
target_link_options(evm_runtime PUBLIC --stack-size=34720)
target_link_options(evm_runtime PUBLIC --stack-size=37328)
endif()
4 changes: 2 additions & 2 deletions src/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void evm_contract::exec(const exec_input& input, const std::optional<exec_callba
assert_unfrozen();

std::optional<std::pair<const std::string, const ChainConfig*>> found_chain_config = lookup_known_chain(_config->get_chainid());
check( found_chain_config.has_value(), "failed to find expected chain config" );
check( found_chain_config.has_value(), "unknown chainid" );

eosevm::block_mapping bm(_config->get_genesis_time().sec_since_epoch());

Expand Down Expand Up @@ -465,7 +465,7 @@ void evm_contract::process_tx(const runtime_config& rc, eosio::name miner, const
}

std::optional<std::pair<const std::string, const ChainConfig*>> found_chain_config = lookup_known_chain(_config->get_chainid());
check( found_chain_config.has_value(), "failed to find expected chain config" );
check( found_chain_config.has_value(), "unknown chainid" );

eosevm::block_mapping bm(_config->get_genesis_time().sec_since_epoch());

Expand Down
2 changes: 1 addition & 1 deletion tests/init_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ BOOST_FIXTURE_TEST_CASE(check_init, basic_evm_tester) try {
eosio_assert_message_exception,
[](const eosio_assert_message_exception& e) {return testing::expect_assert_message(e, "assertion failure with message: contract not initialized");});

BOOST_REQUIRE_EXCEPTION(init(42),
BOOST_REQUIRE_EXCEPTION(init(0),
eosio_assert_message_exception,
[](const eosio_assert_message_exception& e) {return testing::expect_assert_message(e, "assertion failure with message: unknown chainid");});
init(15555);
Expand Down