From c6dcaefec8c88c8365eb3f1c49939d230ebf6961 Mon Sep 17 00:00:00 2001 From: jouzo <15011228+Jouzo@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:37:28 +0000 Subject: [PATCH] Small perf improvements --- lib/ain-ocean/src/indexer/poolswap.rs | 2 +- src/rpc/blockchain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ain-ocean/src/indexer/poolswap.rs b/lib/ain-ocean/src/indexer/poolswap.rs index 3e424d0aaf..d371ab74e1 100644 --- a/lib/ain-ocean/src/indexer/poolswap.rs +++ b/lib/ain-ocean/src/indexer/poolswap.rs @@ -184,7 +184,7 @@ fn create_new_bucket( impl IndexBlockStart for PoolSwap { fn index_block_start(self, services: &Arc, 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 { diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index f14c56c0fe..9c4501cc3d 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -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);