Remove usage of go-leb128
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
c8b21b30ab
commit
9959234858
@ -11,7 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/filecoin-project/go-bls-sigs"
|
||||
"github.com/filecoin-project/go-leb128"
|
||||
"github.com/multiformats/go-varint"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -94,7 +94,9 @@ func TestVectorsIDAddress(t *testing.T) {
|
||||
maybeAddr, err := NewFromString(tc.expected)
|
||||
assert.NoError(err)
|
||||
assert.Equal(ID, maybeAddr.Protocol())
|
||||
assert.Equal(tc.input, leb128.ToUInt64(maybeAddr.Payload()))
|
||||
id, _, err := varint.FromUvarint(maybeAddr.Payload())
|
||||
assert.NoError(err)
|
||||
assert.Equal(tc.input, id)
|
||||
|
||||
// Round trip to and from bytes
|
||||
maybeAddrBytes, err := NewFromBytes(maybeAddr.Bytes())
|
||||
|
1
go.mod
1
go.mod
@ -12,7 +12,6 @@ require (
|
||||
github.com/filecoin-project/chain-validation v0.0.0-20191106200742-11986803c0f7
|
||||
github.com/filecoin-project/go-amt-ipld v0.0.0-20190919045431-3650716fff16
|
||||
github.com/filecoin-project/go-bls-sigs v0.0.0-20190718224239-4bc4b8a7bbf8
|
||||
github.com/filecoin-project/go-leb128 v0.0.0-20190212224330-8d79a5489543
|
||||
github.com/filecoin-project/go-sectorbuilder v0.0.0-00010101000000-000000000000
|
||||
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
|
Loading…
Reference in New Issue
Block a user