Merge pull request #11109 from ethereum/inlinerHeuristicsFix

Fix small bug in inliner heuristics.
This commit is contained in:
Daniel Kirchner 2021-03-16 14:09:26 +01:00 committed by GitHub
commit 7170c8ac60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ bool Inliner::shouldInlineFullFunctionBody(size_t _tag, ranges::span<AssemblyIte
// the heuristics is optimistic.
if (m_tagsReferencedFromOutside.count(_tag))
inlinedDepositCost += GasMeter::dataGas(
uninlinedFunctionPattern.size() + functionBodySize,
codeSize(uninlinedFunctionPattern) + functionBodySize,
m_isCreation,
m_evmVersion
);