Skip to content

Commit

Permalink
Restore StartBlock check under correct typeID
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Sep 13, 2023
1 parent b3fd350 commit fcd67cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/masternodes/govvariables/attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,11 @@ Res ATTRIBUTES::Validate(const CCustomCSView &view) const {
if (view.GetLastHeight() < Params().GetConsensus().FortCanningRoadHeight) {
return DeFiErrors::GovVarValidateFortCanningRoad();
}
if (attrV0->key == DFIPKeys::StartBlock) {
if (view.GetLastHeight() < Params().GetConsensus().FortCanningSpringHeight) {
return Res::Err("Cannot be set before FortCanningSpringHeight");
}
}
} else if (attrV0->typeId != ParamIDs::DFIP2201) {
return Res::Err("Unrecognised param id");
}
Expand Down

0 comments on commit fcd67cf

Please sign in to comment.