Skip to content

Commit 9d4ef1a

Browse files
authored
Coreth sync (#1418)
* fix test generator (#724) * add go mod tidy check
1 parent 1fdaab7 commit 9d4ef1a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
- name: Run actionlint
3636
shell: bash
3737
run: scripts/actionlint.sh
38+
- name: go mod tidy
39+
run: |
40+
go mod tidy
41+
git diff --exit-code
3842
3943
unit_test:
4044
name: Golang Unit Tests (${{ matrix.os }})

triedb/pathdb/database_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ func (t *tester) generate(parent common.Hash) (common.Hash, *trienode.MergedNode
228228
dirties = make(map[common.Hash]struct{})
229229
)
230230
for i := 0; i < 20; i++ {
231-
switch rand.Intn(opLen) {
231+
op := createAccountOp
232+
if i > 0 {
233+
op = rand.Intn(opLen)
234+
}
235+
switch op {
232236
case createAccountOp:
233237
// account creation
234238
addr := testutil.RandomAddress()

0 commit comments

Comments
 (0)