-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Spark coinbase #1494
base: master
Are you sure you want to change the base?
Spark coinbase #1494
Changes from all commits
90c9b9c
63f11f1
0ae0b80
d9a3276
dc29f5b
05d5c84
484e80b
2738e20
98d5fc4
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 | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,6 +13,7 @@ struct MintedCoinData { | |||||||||||||||||||||||||||
Address address; | ||||||||||||||||||||||||||||
uint64_t v; | ||||||||||||||||||||||||||||
std::string memo; | ||||||||||||||||||||||||||||
char type; | ||||||||||||||||||||||||||||
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. 🛠️ Refactor suggestion Document the type field and consider using an enum class. The newly added Consider the following improvements: +// Defines the type of minted coin (e.g., regular mint, coinbase)
+enum class CoinType : char {
+ MINT = 0,
+ COINBASE = 1
+};
+
struct MintedCoinData {
Address address;
uint64_t v;
std::string memo;
- char type;
+ CoinType type; // Type of the minted coin
}; This change would:
📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
class MintTransaction { | ||||||||||||||||||||||||||||
|
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.
💡 Codebase verification
Let me analyze the results and generate a final response.
TODO comments and inconsistent initialization need attention
The verification reveals several concerns:
nSparkCoinbase
valuesnSparkCoinbase
equal tonSparkStartBlock
Required actions:
nSparkCoinbase
andnSparkStartBlock
across all networks (currently only DevNet follows a clear pattern)🔗 Analysis chain
Verify initialization across different networks.
Ensure that
nSparkCoinbase
is properly initialized in chainparams.cpp for all networks (mainnet, testnet, regtest) and that the values are coordinated withnSparkStartBlock
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 2045