Skip to content

Commit

Permalink
Revert "Try remove +100 in _test"
Browse files Browse the repository at this point in the history
This reverts commit 62c0f32.
  • Loading branch information
Daniel committed Nov 2, 2022
1 parent 62c0f32 commit 31f0288
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x/ccv/provider/keeper/keyassignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func key(seed int) tmprotocrypto.PublicKey {

// Num traces to run for heuristic testing
// About 1.5 secs per trace when using real store
const NUM_TRACES = 100
const NUM_TRACES = 4000

// Len of trace for a single heuristic testing run
const TRACE_LEN = 400
Expand Down Expand Up @@ -353,6 +353,7 @@ func (d *driver) externalInvariants() {

// Simply check every consumer key for the correct queryable-ness.
for ck := 0; ck < NUM_CKS; ck++ {
ck += 100 //TODO: fix with others
cca := providerkeeper.TMCryptoPublicKeyToConsAddr(key(ck))
_, actualQueryable := d.ka.GetProviderPubKeyFromConsumerConsAddress(cca)
if expect, found := expectQueryable[providerkeeper.DeterministicStringify(key(ck))]; found && expect {
Expand Down Expand Up @@ -383,7 +384,7 @@ func getTrace(t *testing.T) []traceStep {
// include none (to) all validators
pks := rand.Perm(NUM_VALS)[0:rand.Intn(NUM_VALS+1)]
for _, pk := range pks {
ck := rand.Intn(NUM_CKS)
ck := rand.Intn(NUM_CKS) + 100 // differentiate from pk
ret = append(ret, keyAssignmentEntry{key(pk), key(ck)})
}
}
Expand All @@ -410,7 +411,7 @@ func getTrace(t *testing.T) []traceStep {
// The real system may use some manual set defaults.
initialAssignment := []keyAssignmentEntry{}
for pk := 0; pk < NUM_VALS; pk++ {
ck := pk
ck := pk + 100 // differentiate from i
initialAssignment = append(initialAssignment, keyAssignmentEntry{key(pk), key(ck)})
}

Expand Down

0 comments on commit 31f0288

Please sign in to comment.