Skip to content
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

Disable consortium after metachain #2591

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/dfi/govvariables/attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,9 @@ Res ATTRIBUTES::Validate(const CCustomCSView &view) const {
break;

case AttributeTypes::Consortium:
if (view.GetLastHeight() >= Params().GetConsensus().DF22MetachainHeight && !IsRegtestNetwork()) {
return Res::Err("Cannot be set after MetachainHeight");
}
switch (attrV0->key) {
case ConsortiumKeys::MemberValues: {
if (view.GetLastHeight() < Params().GetConsensus().DF20GrandCentralHeight) {
Expand Down Expand Up @@ -2072,6 +2075,11 @@ Res ATTRIBUTES::Validate(const CCustomCSView &view) const {
if (view.GetLastHeight() < Params().GetConsensus().DF22MetachainHeight) {
return Res::Err("Cannot be set before MetachainHeight");
}
} else if (attrV0->key == DFIPKeys::ConsortiumEnabled) {
if (view.GetLastHeight() >= Params().GetConsensus().DF22MetachainHeight &&
!IsRegtestNetwork()) {
return Res::Err("Cannot be set after MetachainHeight");
}
}
} else if (attrV0->typeId == ParamIDs::Foundation) {
if (view.GetLastHeight() < Params().GetConsensus().DF20GrandCentralHeight) {
Expand Down