Skip to content

Commit ef66d06

Browse files
xdustinfaceUdjinM6
andcommitted
llmq: Make sure CDKGSessionHandler uses a valid LLMQ type
Co-Authored-By: UdjinM6 <[email protected]>
1 parent 0103306 commit ef66d06

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/llmq/quorums_dkgsessionhandler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ CDKGSessionHandler::CDKGSessionHandler(const Consensus::LLMQParams& _params, CBL
9494
pendingJustifications((size_t)_params.size * 2, MSG_QUORUM_JUSTIFICATION),
9595
pendingPrematureCommitments((size_t)_params.size * 2, MSG_QUORUM_PREMATURE_COMMITMENT)
9696
{
97+
if (params.type == Consensus::LLMQ_NONE) {
98+
throw std::runtime_error("Can't initialize CDKGSessionHandler with LLMQ_NONE type.");
99+
}
97100
}
98101

99102
CDKGSessionHandler::~CDKGSessionHandler()

0 commit comments

Comments
 (0)