This repository was archived by the owner on Oct 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ struct EVMSchedule
8383 boost::optional<u256> blockRewardOverwrite;
8484
8585 bool staticCallDepthLimit () const { return !eip150Mode; }
86- bool suicideChargesNewAccountGas () const { return eip150Mode; }
8786 bool emptinessIsNonexistence () const { return eip158Mode; }
8887 bool zeroValueTransferChargesNewAccountGas () const { return !eip158Mode; }
8988};
Original file line number Diff line number Diff line change @@ -338,12 +338,11 @@ void LegacyVM::interpretCases()
338338 // Starting with EIP150, self-destructs need to pay both gas cost and account creation
339339 // gas cost. Starting with EIP158, 0-value self-destructs don't need to pay this account
340340 // creation cost.
341- if (m_schedule->zeroValueTransferChargesNewAccountGas () ||
342- m_schedule->suicideChargesNewAccountGas ())
343- if (m_schedule->zeroValueTransferChargesNewAccountGas () ||
344- m_ext->balance (m_ext->myAddress ) > 0 )
345- if (m_schedule->suicideChargesNewAccountGas () && !m_ext->exists (dest))
346- m_runGas += m_schedule->callNewAccountGas ;
341+ if (m_schedule->eip150Mode && (!m_schedule->eip158Mode || m_ext->balance (dest) > 0 ))
342+ {
343+ if (!m_ext->exists (dest))
344+ m_runGas += m_schedule->callNewAccountGas ;
345+ }
347346
348347 updateIOGas ();
349348 m_ext->suicide (dest);
You can’t perform that action at this time.
0 commit comments