|
4 | 4 | "bytes"
|
5 | 5 | "context"
|
6 | 6 | "encoding/binary"
|
7 |
| - "math/rand" |
8 | 7 | "testing"
|
9 | 8 |
|
10 | 9 | "github.com/ethereum/go-ethereum/common"
|
@@ -37,7 +36,7 @@ func TestHandleDecryptionKeySharesThresholdNotReached(t *testing.T) {
|
37 | 36 |
|
38 | 37 | err = obsKeyperDB.InsertKeyperSet(ctx, obskeyperdatabase.InsertKeyperSetParams{
|
39 | 38 | KeyperConfigIndex: int64(keyperConfigIndex),
|
40 |
| - ActivationBlockNumber: rand.Int63(), |
| 39 | + ActivationBlockNumber: 1, |
41 | 40 | Keypers: shdb.EncodeAddresses([]common.Address{sender}),
|
42 | 41 | Threshold: 2,
|
43 | 42 | })
|
@@ -111,7 +110,7 @@ func TestHandleDecryptionKeySharesThresholdReached(t *testing.T) {
|
111 | 110 |
|
112 | 111 | err = obsKeyperDB.InsertKeyperSet(ctx, obskeyperdatabase.InsertKeyperSetParams{
|
113 | 112 | KeyperConfigIndex: int64(keyperConfigIndex),
|
114 |
| - ActivationBlockNumber: rand.Int63(), |
| 113 | + ActivationBlockNumber: 1, |
115 | 114 | Keypers: shdb.EncodeAddresses([]common.Address{keyper1Address, keyper2Address}),
|
116 | 115 | Threshold: 2,
|
117 | 116 | })
|
@@ -239,7 +238,7 @@ func TestValidateAndHandleDecryptionKey(t *testing.T) {
|
239 | 238 |
|
240 | 239 | err = obsKeyperDB.InsertKeyperSet(ctx, obskeyperdatabase.InsertKeyperSetParams{
|
241 | 240 | KeyperConfigIndex: int64(keyperConfigIndex),
|
242 |
| - ActivationBlockNumber: rand.Int63(), |
| 241 | + ActivationBlockNumber: 1, |
243 | 242 | Keypers: shdb.EncodeAddresses([]common.Address{keyper1Address, keyper2Address}),
|
244 | 243 | Threshold: 2,
|
245 | 244 | })
|
@@ -327,7 +326,7 @@ func TestInValidateDecryptionKey(t *testing.T) {
|
327 | 326 |
|
328 | 327 | err = obsKeyperDB.InsertKeyperSet(ctx, obskeyperdatabase.InsertKeyperSetParams{
|
329 | 328 | KeyperConfigIndex: int64(keyperConfigIndex),
|
330 |
| - ActivationBlockNumber: rand.Int63(), |
| 329 | + ActivationBlockNumber: 1, |
331 | 330 | Keypers: shdb.EncodeAddresses([]common.Address{keyper1Address, keyper2Address}),
|
332 | 331 | Threshold: 2,
|
333 | 332 | })
|
|
0 commit comments