From 3ff65632c34264ca73af764ce33248b6e2e3939b Mon Sep 17 00:00:00 2001 From: canonbrother Date: Wed, 27 Mar 2024 11:05:26 +0800 Subject: [PATCH] logevmaccountstates: return empty string before DF22MetachainHeight --- src/dfi/rpc_evm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dfi/rpc_evm.cpp b/src/dfi/rpc_evm.cpp index 41fd5f35008..5be8980c9d6 100644 --- a/src/dfi/rpc_evm.cpp +++ b/src/dfi/rpc_evm.cpp @@ -566,6 +566,12 @@ UniValue logevmaccountstates(const JSONRPCRequest &request) { } .Check(request); + auto &consensus = Params().GetConsensus(); + const CBlockIndex *tip = ::ChainActive().Tip(); + if (tip->nHeight < consensus.DF22MetachainHeight) { + return ""; + } + CrossBoundaryResult result; const auto dumpResults = debug_log_account_states(result); if (!result.ok) {