-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: multiple kernel-0 preparations #7299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
aa4e692
d0414cc
312ca8e
2b2d0a4
646c2c8
f4ee8b4
69d4a06
3441f04
0bcb345
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,19 +5,45 @@ | |||||||||||
| #ifndef BITCOIN_CHAINLOCK_CHAINLOCK_H | ||||||||||||
| #define BITCOIN_CHAINLOCK_CHAINLOCK_H | ||||||||||||
|
|
||||||||||||
| #include <chain.h> | ||||||||||||
| #include <chainlock/clsig.h> | ||||||||||||
| #include <bls/bls.h> | ||||||||||||
| #include <gsl/pointers.h> | ||||||||||||
| #include <serialize.h> | ||||||||||||
| #include <sync.h> | ||||||||||||
| #include <uint256.h> | ||||||||||||
|
|
||||||||||||
| class CBlockIndex; | ||||||||||||
| class CSporkManager; | ||||||||||||
| class uint256; | ||||||||||||
|
Comment on lines
+14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Nitpick: Redundant forward declaration of uint256 Line 12 💡 Suggested change
Suggested change
source: ['claude'] |
||||||||||||
|
|
||||||||||||
| namespace chainlock { | ||||||||||||
|
|
||||||||||||
| //! Depth of block including transactions before it's considered safe | ||||||||||||
| static constexpr int32_t TX_CONFIRM_THRESHOLD{5}; | ||||||||||||
|
|
||||||||||||
| struct ChainLockSig { | ||||||||||||
| private: | ||||||||||||
| int32_t nHeight{-1}; | ||||||||||||
| uint256 blockHash; | ||||||||||||
| CBLSSignature sig; | ||||||||||||
|
|
||||||||||||
| public: | ||||||||||||
| ChainLockSig(); | ||||||||||||
| ~ChainLockSig(); | ||||||||||||
|
|
||||||||||||
| ChainLockSig(int32_t nHeight, const uint256& blockHash, const CBLSSignature& sig); | ||||||||||||
|
|
||||||||||||
| [[nodiscard]] int32_t getHeight() const { return nHeight; } | ||||||||||||
| [[nodiscard]] const uint256& getBlockHash() const { return blockHash; } | ||||||||||||
| [[nodiscard]] const CBLSSignature& getSig() const { return sig; } | ||||||||||||
| [[nodiscard]] bool IsNull() const { return nHeight == -1 && blockHash == uint256(); } | ||||||||||||
| [[nodiscard]] std::string ToString() const; | ||||||||||||
|
|
||||||||||||
| SERIALIZE_METHODS(ChainLockSig, obj) | ||||||||||||
| { | ||||||||||||
| READWRITE(obj.nHeight, obj.blockHash, obj.sig); | ||||||||||||
| } | ||||||||||||
| }; | ||||||||||||
|
|
||||||||||||
| class Chainlocks | ||||||||||||
| { | ||||||||||||
| private: | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 Nitpick: Redundant forward declaration of uint256
#include <uint256.h>at line 12 already brings in the full type, soclass uint256;at line 16 is redundant. uint256 is also used as a complete type later in the file (memberblockHash, return values, equality comparisons), so the forward declaration is misleading about the include dependency. Drop it.💡 Suggested change
source: ['claude']