From 587589bd21381512fc44c259d077c87d1441cae6 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Thu, 21 Mar 2024 18:28:27 -0300 Subject: [PATCH] Fix tests --- tests/basic_evm_tester.cpp | 4 ++-- tests/basic_evm_tester.hpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/basic_evm_tester.cpp b/tests/basic_evm_tester.cpp index 9a185108..8c132de2 100644 --- a/tests/basic_evm_tester.cpp +++ b/tests/basic_evm_tester.cpp @@ -681,10 +681,10 @@ intx::uint128 basic_evm_tester::tx_data_cost(const silkworm::Transaction& txn) c } const intx::uint128 non_zero_bytes{as_range::count_if(txn.data, [](uint8_t c) { return c != 0; })}; - const intx::uint128 nonZeroGas{silkworm::fee::kGTxDataNonZeroIstanbul}; + const intx::uint128 nonZeroGas{silkworm::protocol::fee::kGTxDataNonZeroIstanbul}; gas += non_zero_bytes * nonZeroGas; const intx::uint128 zero_bytes{data_len - non_zero_bytes}; - gas += zero_bytes * silkworm::fee::kGTxDataZero; + gas += zero_bytes * silkworm::protocol::fee::kGTxDataZero; return gas; } diff --git a/tests/basic_evm_tester.hpp b/tests/basic_evm_tester.hpp index f68af279..ec6ecaea 100644 --- a/tests/basic_evm_tester.hpp +++ b/tests/basic_evm_tester.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include @@ -468,6 +468,8 @@ class basic_evm_tester : public evm_validating_tester bool scan_gcstore(std::function visitor) const; bool scan_account_code(std::function visitor) const; void scan_balances(std::function visitor) const; + + intx::uint128 tx_data_cost(const silkworm::Transaction& txn) const; }; inline constexpr intx::uint256 operator"" _wei(const char* s) { return intx::from_string(s); }