diff --git a/src/rest.cpp b/src/rest.cpp index 4a9c7e79b4..66f39c1ec3 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -248,7 +248,7 @@ static bool rest_headers(const CoreContext& context, case RetFormat::JSON: { UniValue jsonHeaders(UniValue::VARR); for (const CBlockIndex *pindex : headers) { - jsonHeaders.push_back(blockheaderToJSON(tip, pindex, *llmq::chainLocksHandler, *llmq::quorumInstantSendManager)); + jsonHeaders.push_back(blockheaderToJSON(tip, pindex, *llmq::chainLocksHandler)); } std::string strJSON = jsonHeaders.write() + "\n"; req->WriteHeader("Content-Type", "application/json"); diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 5baf3c3d33..5c3890a0c9 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -127,7 +127,7 @@ static const CBlockIndex* ParseHashOrHeight(const UniValue& param, ChainstateMan } } -UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex, llmq::CChainLocksHandler& clhandler, llmq::CInstantSendManager& isman) +UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex, llmq::CChainLocksHandler& clhandler) { // Serialize passed information without accessing chain state of the active chain! AssertLockNotHeld(cs_main); // For performance reasons @@ -161,7 +161,7 @@ UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex UniValue blockToJSON(BlockManager& blockman, const CBlock& block, const CBlockIndex* tip, const CBlockIndex* blockindex, llmq::CChainLocksHandler& clhandler, llmq::CInstantSendManager& isman, bool txDetails) { - UniValue result = blockheaderToJSON(tip, blockindex, clhandler, isman); + UniValue result = blockheaderToJSON(tip, blockindex, clhandler); result.pushKV("size", (int)::GetSerializeSize(block, PROTOCOL_VERSION)); UniValue txs(UniValue::VARR); @@ -986,7 +986,7 @@ static RPCHelpMan getblockheader() } LLMQContext& llmq_ctx = EnsureLLMQContext(node); - return blockheaderToJSON(tip, pblockindex, *llmq_ctx.clhandler, *llmq_ctx.isman); + return blockheaderToJSON(tip, pblockindex, *llmq_ctx.clhandler); }, }; } @@ -1087,7 +1087,7 @@ static RPCHelpMan getblockheaders() LLMQContext& llmq_ctx = EnsureLLMQContext(node); for (; pblockindex; pblockindex = active_chain.Next(pblockindex)) { - arrHeaders.push_back(blockheaderToJSON(tip, pblockindex, *llmq_ctx.clhandler, *llmq_ctx.isman)); + arrHeaders.push_back(blockheaderToJSON(tip, pblockindex, *llmq_ctx.clhandler)); if (--nCount <= 0) break; } diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h index f147776152..e383aba436 100644 --- a/src/rpc/blockchain.h +++ b/src/rpc/blockchain.h @@ -50,7 +50,7 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool, llmq::CInstantSendManager& is UniValue MempoolToJSON(const CTxMemPool& pool, llmq::CInstantSendManager* isman, bool verbose = false, bool include_mempool_sequence = false); /** Block header to JSON */ -UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex, llmq::CChainLocksHandler& clhandler, llmq::CInstantSendManager& isman) LOCKS_EXCLUDED(cs_main); +UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex, llmq::CChainLocksHandler& clhandler) LOCKS_EXCLUDED(cs_main); /** Used by getblockstats to get feerates at different percentiles by weight */ void CalculatePercentilesBySize(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES], std::vector>& scores, int64_t total_size);