Skip to content

Commit

Permalink
Small perf improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo committed Oct 29, 2024
1 parent 13b48f6 commit c6dcaef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ain-ocean/src/indexer/poolswap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ fn create_new_bucket(

impl IndexBlockStart for PoolSwap {
fn index_block_start(self, services: &Arc<Services>, block: &BlockContext) -> Result<()> {
let mut pool_pairs = ain_cpp_imports::get_pool_pairs();
let mut pool_pairs = services.pool_pair_cache.get();
pool_pairs.sort_by(|a, b| b.creation_height.cmp(&a.creation_height));

for interval in AGGREGATED_INTERVALS {
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ UniValue blockToJSON(CCustomCSView &view, const CBlock& block, const CBlockIndex
// Serialize passed information without accessing chain state of the active chain!
AssertLockNotHeld(cs_main); // For performance reasons
const auto consensus = Params().GetConsensus();
const auto isEvmEnabledForBlock = IsEVMEnabled(view);
const auto isEvmEnabledForBlock = version > 2 && IsEVMEnabled(view);

auto txsToUniValue = [&](const CBlock& block, bool txDetails, int version) {
UniValue txs(UniValue::VARR);
Expand Down

0 comments on commit c6dcaef

Please sign in to comment.