Skip to content

Commit c6c4f06

Browse files
committed
start test client with contract map, because otherwise sometimes ThreeIndexEvent would be read from subdebug contract and sometimes from debug, depending on the ordering of abis, and even though both events have the same names one has a non-indexed field, which is indexed in the other
1 parent fbb5253 commit c6c4f06

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

seth/client_decode_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func TestSmokeDebugReverts(t *testing.T) {
13-
c := newClient(t)
13+
c := newClientWithContractMapFromEnv(t)
1414

1515
type test struct {
1616
name string
@@ -63,7 +63,7 @@ func TestSmokeDebugReverts(t *testing.T) {
6363
}
6464

6565
func TestSmokeDebugData(t *testing.T) {
66-
c := newClient(t)
66+
c := newClientWithContractMapFromEnv(t)
6767
c.Cfg.TracingLevel = seth.TracingLevel_All
6868

6969
type test struct {
@@ -226,9 +226,10 @@ func TestSmokeDebugData(t *testing.T) {
226226
require.NoError(t, err)
227227
require.Equal(t, dtx.Input, tc.output.Input)
228228
require.Equal(t, dtx.Output, tc.output.Output)
229+
require.Equal(t, len(tc.output.Events), len(dtx.Events))
229230
for i, e := range tc.output.Events {
230231
require.NotNil(t, dtx.Events[i])
231-
require.Equal(t, dtx.Events[i].EventData, e.EventData)
232+
require.Equal(t, e.EventData, dtx.Events[i].EventData)
232233
}
233234
}
234235
})

0 commit comments

Comments
 (0)