Skip to content

Commit

Permalink
Use v3 specific worker group
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Apr 5, 2024
1 parent 3b2d65b commit 224f3b8
Show file tree
Hide file tree
Showing 26 changed files with 2,099 additions and 444 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/Maldris/mathparse v0.0.0-20170508133428-f0d009a7a773
github.com/ethereum/go-ethereum v1.13.8
github.com/go-echarts/go-echarts/v2 v2.2.6
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.3.1
github.com/jedib0t/go-pretty/v6 v6.4.7
github.com/pkg/errors v0.9.1
Expand Down
2 changes: 1 addition & 1 deletion internal/util/v2/array.go → internal/util/array.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import "sync"

Expand Down
25 changes: 13 additions & 12 deletions internal/util/v2/array_test.go → internal/util/array_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"sort"
Expand Down Expand Up @@ -60,14 +60,15 @@ func TestNewSyncedArray(t *testing.T) {
})
}

func TestUnflatten(t *testing.T) {
groups := Unflatten[int]([]int{0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 8, 9, 111, 999, 999}, 3)

assert.Equal(t, 6, len(groups))
assert.Equal(t, []int{0, 1, 1}, groups[0])
assert.Equal(t, []int{2, 2, 3}, groups[1])
assert.Equal(t, []int{4, 4, 5}, groups[2])
assert.Equal(t, []int{5, 6, 7}, groups[3])
assert.Equal(t, []int{8, 9, 111}, groups[4])
assert.Equal(t, []int{999, 999}, groups[5])
}
//
//func TestUnflatten(t *testing.T) {
// groups := Unflatten[int]([]ocr2keepers.UpkeepKey{0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 8, 9, 111, 999, 999}, 3)
//
// assert.Equal(t, 6, len(groups))
// assert.Equal(t, []int{0, 1, 1}, groups[0])
// assert.Equal(t, []int{2, 2, 3}, groups[1])
// assert.Equal(t, []int{4, 4, 5}, groups[2])
// assert.Equal(t, []int{5, 6, 7}, groups[3])
// assert.Equal(t, []int{8, 9, 111}, groups[4])
// assert.Equal(t, []int{999, 999}, groups[5])
//}
2 changes: 1 addition & 1 deletion internal/util/v2/closer.go → internal/util/closer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion internal/util/v2/rand.go → internal/util/rand.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"crypto/aes"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"crypto/cipher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"log"
Expand Down
2 changes: 1 addition & 1 deletion internal/util/v2/result.go → internal/util/result.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

type Results struct {
Successes int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package util

import (
"testing"
Expand Down
Loading

0 comments on commit 224f3b8

Please sign in to comment.