diff --git a/src/evo/chainhelper.cpp b/src/evo/chainhelper.cpp index d4661d71b7246..9c11fc4e6a3cf 100644 --- a/src/evo/chainhelper.cpp +++ b/src/evo/chainhelper.cpp @@ -38,7 +38,7 @@ bool CChainstateHelper::HasChainLock(int nHeight, const uint256& blockHash) cons return clhandler.HasChainLock(nHeight, blockHash); } -int32_t CChainstateHelper::GetBestChainLockHeight() const { return clhandler.GetBestChainLock().getHeight(); } +int32_t CChainstateHelper::GetBestChainLockHeight() const { return clhandler.GetBestChainLockHeight(); } /** Passthrough functions to CInstantSendManager */ std::optional> CChainstateHelper::ConflictingISLockIfAny( diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 8b2626570da11..d99aeb8aee74d 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -173,7 +173,7 @@ static bool CalcCbTxBestChainlock(const llmq::CChainLocksHandler& chainlock_hand // Inserting our best CL bestCLHeightDiff = pindexPrev->nHeight - best_clsig.getHeight(); - bestCLSignature = chainlock_handler.GetBestChainLock().getSig(); + bestCLSignature = best_clsig.getSig(); return true; } diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 424b8cd064e2b..c06a297ea3c54 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -667,8 +667,9 @@ static RPCHelpMan getassetunlockstatuses() } else { const auto pBlockIndexBestCL = [&]() -> const CBlockIndex* { - if (!llmq_ctx.clhandler->GetBestChainLock().IsNull()) { - return pTipBlockIndex->GetAncestor(llmq_ctx.clhandler->GetBestChainLock().getHeight()); + const auto best_clsig = llmq_ctx.clhandler->GetBestChainLock(); + if (!best_clsig.IsNull()) { + return pTipBlockIndex->GetAncestor(best_clsig.getHeight()); } // If no CL info is available, try to use CbTx CL information if (const auto cbtx_best_cl = GetNonNullCoinbaseChainlock(pTipBlockIndex)) {