Skip to content

Commit afc9844

Browse files
committed
refactor: consolidate CFinalCommitmentPtr definitions
1 parent 2c62b58 commit afc9844

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/llmq/commitment.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
#ifndef BITCOIN_LLMQ_COMMITMENT_H
66
#define BITCOIN_LLMQ_COMMITMENT_H
77

8-
#include <bls/bls.h>
9-
#include <llmq/params.h>
108
#include <primitives/transaction.h>
119
#include <util/irange.h>
1210
#include <util/strencodings.h>
1311
#include <util/underlying.h>
1412

13+
#include <bls/bls.h>
14+
#include <llmq/params.h>
15+
#include <llmq/types.h>
16+
1517
#include <gsl/pointers.h>
1618
#include <univalue.h>
1719

@@ -156,7 +158,6 @@ class CFinalCommitment
156158
return HexStr(vBytes);
157159
}
158160
};
159-
using CFinalCommitmentPtr = std::unique_ptr<CFinalCommitment>;
160161

161162
class CFinalCommitmentTxPayload
162163
{

src/llmq/quorums.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ class CQuorumDataRequest
170170
* the public key shares of individual members, which are needed to verify signature shares of these members.
171171
*/
172172

173-
class CFinalCommitment;
174-
using CFinalCommitmentPtr = std::unique_ptr<CFinalCommitment>;
175-
176-
177173
class CQuorum
178174
{
179175
friend class CQuorumManager;

src/llmq/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class CDeterministicMN;
1414
class uint256;
1515
struct StaticSaltedHasher;
1616
namespace llmq {
17+
class CFinalCommitment;
1718
class CQuorum;
1819
} // namespace llmq
1920

@@ -26,6 +27,7 @@ template <typename T, size_t MaxSize = 0ul, size_t TruncateThreshold = 0ul>
2627
using Uint256LruHashMap = unordered_lru_cache<uint256, T, StaticSaltedHasher, MaxSize, TruncateThreshold>;
2728

2829
namespace llmq {
30+
using CFinalCommitmentPtr = std::unique_ptr<CFinalCommitment>;
2931
using CQuorumPtr = std::shared_ptr<CQuorum>;
3032
using CQuorumCPtr = std::shared_ptr<const CQuorum>;
3133
} // namespace llmq

0 commit comments

Comments
 (0)