-
Couldn't load subscription status.
- Fork 1.2k
feat: start DIP0024 from block 1 - fire up test chains by first block - 7/n #6325
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
Changes from all commits
26e9813
4dafec8
d8ce0a7
de821b9
343c74b
632c4c4
2bafadf
efd4701
cf84dff
f1905ca
906c2d7
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Tests | ||
| ----- | ||
|
|
||
| - Command line arguments -dip8params, -bip147height are removed in favour of -testactivationheight. (dash#6325) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,26 +116,26 @@ std::map<Consensus::LLMQType, QvvecSyncMode> GetEnabledQuorumVvecSyncEntries() | |
|
|
||
| bool IsQuorumTypeEnabled(Consensus::LLMQType llmqType, gsl::not_null<const CBlockIndex*> pindexPrev) | ||
| { | ||
| return IsQuorumTypeEnabledInternal(llmqType, pindexPrev, std::nullopt, std::nullopt); | ||
| return IsQuorumTypeEnabledInternal(llmqType, pindexPrev, std::nullopt); | ||
| } | ||
|
|
||
| bool IsQuorumTypeEnabledInternal(Consensus::LLMQType llmqType, gsl::not_null<const CBlockIndex*> pindexPrev, | ||
| std::optional<bool> optDIP0024IsActive, std::optional<bool> optHaveDIP0024Quorums) | ||
| std::optional<bool> optIsDIP0024Active) | ||
| { | ||
| const Consensus::Params& consensusParams = Params().GetConsensus(); | ||
|
|
||
| const bool fDIP0024IsActive{optDIP0024IsActive.value_or(DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_DIP0024))}; | ||
| const bool fHaveDIP0024Quorums{optHaveDIP0024Quorums.value_or(pindexPrev->nHeight >= consensusParams.DIP0024QuorumsHeight)}; | ||
| const bool fDIP0024IsActive{ | ||
| optIsDIP0024Active.value_or(DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_DIP0024))}; | ||
|
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. nit: we should rework this, currently this will always call DeploymentActiveAfter as it's a param. Should put in a lambda or something to avoid calling DeploymentActiveAfter if optIsDIP0024Active is set 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. we discussed it, this Also just a side note (not really important in this particular case) the function |
||
| switch (llmqType) | ||
| { | ||
| case Consensus::LLMQType::LLMQ_DEVNET: | ||
| return true; | ||
| case Consensus::LLMQType::LLMQ_50_60: | ||
| return !fDIP0024IsActive || !fHaveDIP0024Quorums || Params().NetworkIDString() == CBaseChainParams::TESTNET || | ||
| return !fDIP0024IsActive || Params().NetworkIDString() == CBaseChainParams::TESTNET || | ||
| Params().NetworkIDString() == CBaseChainParams::DEVNET; | ||
| case Consensus::LLMQType::LLMQ_TEST_INSTANTSEND: | ||
| return !fDIP0024IsActive || !fHaveDIP0024Quorums || | ||
| consensusParams.llmqTypeDIP0024InstantSend == Consensus::LLMQType::LLMQ_TEST_INSTANTSEND; | ||
| return !fDIP0024IsActive || | ||
| consensusParams.llmqTypeDIP0024InstantSend == Consensus::LLMQType::LLMQ_TEST_INSTANTSEND; | ||
| case Consensus::LLMQType::LLMQ_TEST: | ||
| case Consensus::LLMQType::LLMQ_TEST_PLATFORM: | ||
| case Consensus::LLMQType::LLMQ_400_60: | ||
|
|
||
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.
block_index can be null here?
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.
it seems unrelated because it was used in
ReadBlockFromDiskbefore without extra checks:Anyway, I added extra annotations just in case, see a new commit