Skip to content

Commit

Permalink
refactor: drop circular dependency llmq/quorums <-> llmq/utils
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Jan 10, 2024
1 parent 60bc3a8 commit 9002f39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/llmq/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <llmq/utils.h>

#include <llmq/options.h>
#include <llmq/quorums.h>
#include <llmq/snapshot.h>

#include <chainparams.h>
Expand All @@ -25,6 +24,12 @@
#include <optional>

class CBLSSignature;
namespace llmq
{
class CQuorum;
using CQuorumPtr = std::shared_ptr<CQuorum>;
using CQuorumCPtr = std::shared_ptr<const CQuorum>;
}

/**
* Forward declarations
Expand Down
3 changes: 2 additions & 1 deletion test/lint/lint-circular-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
"governance/classes -> governance/governance -> governance/classes"
"governance/governance -> governance/object -> governance/governance"
"governance/governance -> masternode/sync -> governance/governance"
"llmq/quorums -> llmq/utils -> llmq/quorums"
"llmq/chainlocks -> llmq/instantsend -> llmq/chainlocks"
"llmq/chainlocks -> llmq/instantsend -> net_processing -> llmq/chainlocks"
"llmq/dkgsessionmgr -> net_processing -> llmq/dkgsessionmgr"
"llmq/dkgsessionmgr -> net_processing -> llmq/quorums -> llmq/dkgsessionmgr"
"llmq/instantsend -> net_processing -> llmq/instantsend"
"llmq/instantsend -> txmempool -> llmq/instantsend"
"llmq/instantsend -> validation -> llmq/instantsend"
Expand Down Expand Up @@ -85,6 +85,7 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
"evo/simplifiedmns -> llmq/blockprocessor -> llmq/utils -> llmq/snapshot -> evo/simplifiedmns"
"llmq/blockprocessor -> llmq/utils -> llmq/snapshot -> llmq/blockprocessor"
"llmq/context -> llmq/dkgsessionmgr -> net_processing -> llmq/context"
"llmq/dkgsession -> llmq/dkgsessionmgr -> net_processing -> llmq/quorums -> llmq/dkgsession"
"llmq/commitment -> llmq/utils -> llmq/snapshot -> llmq/commitment"
"spork -> validation -> spork"
"governance/governance -> validation -> governance/governance"
Expand Down

0 comments on commit 9002f39

Please sign in to comment.