File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,17 @@ func TestKeyregValidityPeriod(t *testing.T) {
497497 partitiontest .PartitionTest (t )
498498 a := require .New (t )
499499
500+ // Patch the global consensus variable since FillDBWithParticipationKeys uses is to check the validity period
501+ // this allows us to reduce the runtime of the test while checking the logic of FillDBWithParticipationKeys
502+ version := config .Consensus [protocol .ConsensusCurrentVersion ]
503+ oldValue := config .Consensus [protocol .ConsensusCurrentVersion ].MaxKeyregValidPeriod
504+ version .MaxKeyregValidPeriod = 256 * (1 << 4 ) - 1
505+ config .Consensus [protocol .ConsensusCurrentVersion ] = version
506+ defer func () {
507+ version .MaxKeyregValidPeriod = oldValue
508+ config .Consensus [protocol .ConsensusCurrentVersion ] = version
509+ }()
510+
500511 maxValidPeriod := config .Consensus [protocol .ConsensusCurrentVersion ].MaxKeyregValidPeriod
501512 dilution := config .Consensus [protocol .ConsensusCurrentVersion ].DefaultKeyDilution
502513
You can’t perform that action at this time.
0 commit comments