Skip to content

Commit

Permalink
#1135 Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroNazarenko committed Dec 18, 2023
1 parent 76b963c commit 36e943a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libethereum/SkaleHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,8 @@ void SkaleHost::createBlock( const ConsensusExtFace::transactions_vector& _appro

// if already known
// TODO clear occasionally this cache?!
Transaction t;
if ( m_m_transaction_cache.find( sha.asArray() ) != m_m_transaction_cache.cend() ) {
t = m_m_transaction_cache.at( sha.asArray() );
Transaction t = m_m_transaction_cache.at( sha.asArray() );
out_txns.push_back( t );
LOG( m_debugLogger ) << "Dropping good txn " << sha << std::endl;
m_debugTracer.tracepoint( "drop_good" );
Expand All @@ -657,7 +656,7 @@ void SkaleHost::createBlock( const ConsensusExtFace::transactions_vector& _appro
// for test std::thread( [t, this]() { m_client.importTransaction( t ); }
// ).detach();
} else {
t = Transaction( data, CheckTransaction::Everything, true );
Transaction t( data, CheckTransaction::Everything, true );
t.checkOutExternalGas( m_client.chainParams().externalGasDifficulty );
out_txns.push_back( t );
LOG( m_debugLogger ) << "Will import consensus-born txn";
Expand Down

0 comments on commit 36e943a

Please sign in to comment.