Skip to content

Commit

Permalink
Merge pull request #1867 from skalenetwork/1856_checkout_external_gas
Browse files Browse the repository at this point in the history
1856_checkout_external_gas
  • Loading branch information
kladkogex authored Apr 11, 2024
2 parents d881577 + f3b977a commit 622187a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libethereum/Transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,15 @@ void Transaction::checkOutExternalGas( const ChainParams& _cp, uint64_t _bn, boo
if ( CorrectForkInPowPatch::isEnabled() )
scheduleForUse = _cp.scheduleForBlockNumber( _bn );


#ifndef HISTORIC_STATE // FIX FOR 2.3.1. Will not be needed in 2.4
// never call checkOutExternalGas with non-last block
if ( _bn != CorrectForkInPowPatch::getLastBlockNumber() ) {
ctrace << _bn << " != " << CorrectForkInPowPatch::getLastBlockNumber();
BOOST_THROW_EXCEPTION( std::runtime_error(
"Internal error: checkOutExternalGas() has invalid block number" ) );
}
#endif

if ( externalGas >= baseGasRequired( scheduleForUse ) )
m_externalGas = externalGas;
Expand Down

0 comments on commit 622187a

Please sign in to comment.