Skip to content

Commit 7bf4819

Browse files
Revert to nil
1 parent 0aef80d commit 7bf4819

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

params/extras/precompile_upgrade_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ func (tt *upgradeCompatibilityTest) run(t *testing.T, chainConfig ChainConfig) {
288288
// if this is not the final upgradeBytes, continue applying
289289
// the next upgradeBytes. (only check the result on the last apply)
290290
if i != len(tt.configs)-1 {
291-
require.NoError(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
291+
require.Nil(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
292292
chainConfig = newCfg
293293
continue
294294
}
295295

296296
if tt.expectedErrorString != "" {
297297
require.ErrorContains(t, err, tt.expectedErrorString)
298298
} else {
299-
require.NoError(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
299+
require.Nil(t, err, "expecting checkConfigCompatible call %d to return nil", i+1)
300300
}
301301
}
302302
}

sync/client/client_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,15 @@ func TestGetLeafs(t *testing.T) {
571571
response, err := handler.OnLeafsRequest(t.Context(), ids.GenerateTestNodeID(), 1, request)
572572
require.NoError(t, err)
573573
require.NotEmpty(t, response)
574-
return response
574+
var leafResponse message.LeafsResponse
575+
_, err = message.Codec.Unmarshal(response, &leafResponse)
576+
require.NoError(t, err)
577+
leafResponse.Keys = leafResponse.Keys[:len(leafResponse.Keys)-1]
578+
leafResponse.Vals = leafResponse.Vals[:len(leafResponse.Vals)-1]
579+
580+
modifiedResponse, err := message.Codec.Marshal(message.Version, leafResponse)
581+
require.NoError(t, err)
582+
return modifiedResponse
575583
},
576584
expectedErr: errInvalidRangeProof,
577585
},

0 commit comments

Comments
 (0)