Skip to content

Commit 282eee8

Browse files
committed
refactor: drop go-varint dependency
1 parent e58384c commit 282eee8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/record/envelope.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package record
22

33
import (
44
"bytes"
5+
"encoding/binary"
56
"errors"
67
"fmt"
78
"sync"
@@ -12,7 +13,6 @@ import (
1213

1314
pool "github.com/libp2p/go-buffer-pool"
1415

15-
"github.com/multiformats/go-varint"
1616
"google.golang.org/protobuf/proto"
1717
)
1818

@@ -278,7 +278,7 @@ func makeUnsigned(domain string, payloadType []byte, payload []byte) ([]byte, er
278278

279279
for i, f := range fields {
280280
l := len(f)
281-
flen[i] = varint.ToUvarint(uint64(l))
281+
flen[i] = binary.AppendUvarint(nil, uint64(l))
282282
size += l + len(flen[i])
283283
}
284284

0 commit comments

Comments
 (0)