diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc6bb7da..b6256d19 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -85,5 +85,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=32768) + target_link_options(evm_runtime PUBLIC --stack-size=38432) endif() diff --git a/src/actions.cpp b/src/actions.cpp index 6617d91c..8f325b7f 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -629,42 +629,6 @@ bool evm_contract::gc(uint32_t max) { return state.gc(max); } -void evm_contract::bridgereg(eosio::name receiver, const eosio::asset& min_fee) { - assert_unfrozen(); - require_auth(receiver); - require_auth(get_self()); // to temporarily prevent registration of unauthorized accounts - - eosio::check(min_fee.symbol == token_symbol, "unexpected symbol"); - eosio::check(min_fee.amount >= 0, "min_fee cannot be negative"); - - auto update_row = [&](auto& row) { - row.account = receiver; - row.min_fee = min_fee; - row.flags = message_receiver::flag::FORCE_ATOMIC; - }; - - message_receiver_table message_receivers(get_self(), get_self().value); - auto it = message_receivers.find(receiver.value); - - if(it == message_receivers.end()) { - message_receivers.emplace(receiver, update_row); - } else { - message_receivers.modify(*it, eosio::same_payer, update_row); - } - - open(receiver); -} - -void evm_contract::bridgeunreg(eosio::name receiver) { - assert_unfrozen(); - require_auth(receiver); - - message_receiver_table message_receivers(get_self(), get_self().value); - auto it = message_receivers.find(receiver.value); - eosio::check(it != message_receivers.end(), "receiver not found"); - message_receivers.erase(*it); -} - void evm_contract::call_(intx::uint256 s, const bytes& to, intx::uint256 value, const bytes& data, uint64_t gas_limit, uint64_t nonce) { const auto& current_config = _config.get(); @@ -746,6 +710,7 @@ void evm_contract::bridgereg(eosio::name receiver, const eosio::asset& min_fee) auto update_row = [&](auto& row) { row.account = receiver; row.min_fee = min_fee; + row.flags = message_receiver::FORCE_ATOMIC; }; message_receiver_table message_receivers(get_self(), get_self().value); diff --git a/tests/basic_evm_tester.cpp b/tests/basic_evm_tester.cpp index 988434db..2e3e9352 100644 --- a/tests/basic_evm_tester.cpp +++ b/tests/basic_evm_tester.cpp @@ -344,11 +344,6 @@ transaction_trace_ptr basic_evm_tester::bridgeunreg(name receiver) { mvo()("receiver", receiver)); } -transaction_trace_ptr basic_evm_tester::exec(const exec_input& input, const std::optional& callback) { - auto binary_data = fc::raw::pack>(input, callback); - return basic_evm_tester::push_action(evm_account_name, "exec"_n, evm_account_name, bytes{binary_data.begin(), binary_data.end()}); -} - transaction_trace_ptr basic_evm_tester::pushtx(const silkworm::Transaction& trx, name miner) { silkworm::Bytes rlp;