Skip to content

Commit 64037bb

Browse files
committed
Remove ExecutionState::get_tx_initcode_by_hash()
1 parent d20b099 commit 64037bb

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

lib/evmone/execution_state.hpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -232,25 +232,5 @@ class ExecutionState
232232
m_tx = host.get_tx_context();
233233
return m_tx;
234234
}
235-
236-
/// Get initcode by its hash from transaction initcodes.
237-
///
238-
/// Returns empty bytes_view if no such initcode was found.
239-
[[nodiscard]] bytes_view get_tx_initcode_by_hash(const evmc_bytes32& hash) noexcept
240-
{
241-
if (!m_initcodes.has_value())
242-
{
243-
m_initcodes.emplace();
244-
const auto& tx_context = get_tx_context();
245-
for (size_t i = 0; i < tx_context.initcodes_count; ++i)
246-
{
247-
const auto& initcode = tx_context.initcodes[i];
248-
m_initcodes->insert({initcode.hash, {initcode.code, initcode.code_size}});
249-
}
250-
}
251-
252-
const auto it = m_initcodes->find(hash);
253-
return it != m_initcodes->end() ? it->second : bytes_view{};
254-
}
255235
};
256236
} // namespace evmone

0 commit comments

Comments
 (0)