Skip to content

Commit 300ef9f

Browse files
committed
Refactor test helper function for creating message binary
1 parent c383186 commit 300ef9f

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

internal/api/lib_test.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ func Benchmark100ConcurrentContractCalls(b *testing.B) {
869869
resChan := make(chan []byte, callCount)
870870
wg.Add(callCount)
871871

872-
info = mockInfoBinNoAssert("fred")
872+
info = MockInfoBin(b, "fred")
873873

874874
for i := 0; i < callCount; i++ {
875875
go func() {
@@ -1491,16 +1491,3 @@ func TestFloats(t *testing.T) {
14911491
hash := hasher.Sum(nil)
14921492
require.Equal(t, "95f70fa6451176ab04a9594417a047a1e4d8e2ff809609b8f81099496bee2393", hex.EncodeToString(hash))
14931493
}
1494-
1495-
// mockInfoBinNoAssert creates the message binary without using testify assertions
1496-
func mockInfoBinNoAssert(sender types.HumanAddress) []byte {
1497-
info := types.MessageInfo{
1498-
Sender: sender,
1499-
Funds: types.Array[types.Coin]{},
1500-
}
1501-
res, err := json.Marshal(info)
1502-
if err != nil {
1503-
panic(err)
1504-
}
1505-
return res
1506-
}

0 commit comments

Comments
 (0)