File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
avalanchego/vms/platformvm/txs/executor Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,18 @@ func verifyAddPermissionlessValidatorTx(
462462 }
463463
464464 currentTimestamp := chainState .GetTimestamp ()
465+ if constants .IsFlareNetworkID (backend .Ctx .NetworkID ) || constants .IsSgbNetworkID (backend .Ctx .NetworkID ) {
466+ // Flare does not allow permissionless validator tx before Cortina
467+ if currentTimestamp .Before (backend .Config .CortinaTime ) {
468+ return errWrongTxType
469+ }
470+
471+ // Flare does not allow creation of subnets
472+ if tx .Subnet != constants .PrimaryNetworkID {
473+ return errWrongTxType
474+ }
475+ }
476+
465477 // Ensure the proposed validator starts after the current time
466478 startTime := tx .StartTime ()
467479 if ! currentTimestamp .Before (startTime ) {
@@ -643,6 +655,11 @@ func verifyAddPermissionlessDelegatorTx(
643655 }
644656
645657 currentTimestamp := chainState .GetTimestamp ()
658+ // Flare does not allow permissionless delegator tx before Cortina
659+ if currentTimestamp .Before (backend .Config .CortinaTime ) && (constants .IsFlareNetworkID (backend .Ctx .NetworkID ) || constants .IsSgbNetworkID (backend .Ctx .NetworkID )) {
660+ return errWrongTxType
661+ }
662+
646663 // Ensure the proposed validator starts after the current timestamp
647664 startTime := tx .StartTime ()
648665 if ! currentTimestamp .Before (startTime ) {
You can’t perform that action at this time.
0 commit comments