Skip to content

Commit

Permalink
chore(deps): bump github.com/centrifuge/go-substrate-rpc-client/v4 fr…
Browse files Browse the repository at this point in the history
…om 4.0.6 to 4.0.7 (#2856)
  • Loading branch information
dependabot[bot] committed Sep 29, 2022
1 parent e323237 commit c01c4a3
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
5 changes: 3 additions & 2 deletions dot/core/messages_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"

"github.com/ChainSafe/gossamer/dot/network"
"github.com/ChainSafe/gossamer/dot/peerset"
Expand All @@ -37,7 +38,7 @@ func createExtrinsic(t *testing.T, rt RuntimeInstance, genHash common.Hash, nonc
require.NoError(t, err)

meta := &ctypes.Metadata{}
err = ctypes.Decode(decoded, meta)
err = codec.Decode(decoded, meta)
require.NoError(t, err)

rv := rt.Version()
Expand All @@ -60,7 +61,7 @@ func createExtrinsic(t *testing.T, rt RuntimeInstance, genHash common.Hash, nonc
err = ext.Sign(signature.TestKeyringPairAlice, options)
require.NoError(t, err)

extEnc, err := ctypes.EncodeToHex(ext)
extEnc, err := codec.EncodeToHex(ext)
require.NoError(t, err)

extBytes := types.Extrinsic(common.MustHexToBytes(extEnc))
Expand Down
3 changes: 2 additions & 1 deletion dot/core/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
cscale "github.com/centrifuge/go-substrate-rpc-client/v4/scale"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
Expand All @@ -53,7 +54,7 @@ func generateTestCentrifugeMetadata(t *testing.T) *ctypes.Metadata {
require.NoError(t, err)

meta := &ctypes.Metadata{}
err = ctypes.Decode(decoded, meta)
err = codec.Decode(decoded, meta)
require.NoError(t, err)
return meta
}
Expand Down
7 changes: 4 additions & 3 deletions dot/rpc/modules/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/btcsuite/btcutil/base58"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
)

// SystemModule is an RPC module providing access to core API points
Expand Down Expand Up @@ -171,7 +172,7 @@ func (sm *SystemModule) AccountNextIndex(r *http.Request, req *StringRequest, re
found := false
for _, v := range pending {
var ext ctypes.Extrinsic
err := ctypes.Decode(v.Extrinsic, &ext)
err := codec.Decode(v.Extrinsic, &ext)
if err != nil {
return err
}
Expand Down Expand Up @@ -203,7 +204,7 @@ func (sm *SystemModule) AccountNextIndex(r *http.Request, req *StringRequest, re
return err
}
var metadata ctypes.Metadata
err = ctypes.Decode(sdMeta, &metadata)
err = codec.Decode(sdMeta, &metadata)
if err != nil {
return err
}
Expand All @@ -218,7 +219,7 @@ func (sm *SystemModule) AccountNextIndex(r *http.Request, req *StringRequest, re
return err
}
var accountInfo ctypes.AccountInfo
err = ctypes.Decode(accountRaw, &accountInfo)
err = codec.Decode(accountRaw, &accountInfo)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ require (
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.6
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.7
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cheekybits/genny v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.6 h1:Il7zBKEvRwiWN/GHogUjmHzaXfp9TvbbhVAOQ1vVBBQ=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.6/go.mod h1:5g1oM4Zu3BOaLpsKQ+O8PAv2kNuq+kPcA1VzFbsSqxE=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.7 h1:9uqEyHGkJngTa92GIUgMexvbOzBgRlEL7CanRQ+ZcQM=
github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.7/go.mod h1:5g1oM4Zu3BOaLpsKQ+O8PAv2kNuq+kPcA1VzFbsSqxE=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down
3 changes: 2 additions & 1 deletion lib/babe/build_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
cscale "github.com/centrifuge/go-substrate-rpc-client/v4/scale"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
"github.com/ethereum/go-ethereum/metrics"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -222,7 +223,7 @@ func TestBuildAndApplyExtrinsic(t *testing.T) {
require.NoError(t, err)

meta := &ctypes.Metadata{}
err = ctypes.Decode(decoded, meta)
err = codec.Decode(decoded, meta)
require.NoError(t, err)

rv := rt.Version()
Expand Down
5 changes: 3 additions & 2 deletions lib/runtime/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/ChainSafe/gossamer/pkg/scale"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
ctypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -208,7 +209,7 @@ func NewTestExtrinsic(t *testing.T, rt Instance, genHash, blockHash common.Hash,
require.NoError(t, err)

meta := &ctypes.Metadata{}
err = ctypes.Decode(decoded, meta)
err = codec.Decode(decoded, meta)
require.NoError(t, err)

rv := rt.Version()
Expand All @@ -232,7 +233,7 @@ func NewTestExtrinsic(t *testing.T, rt Instance, genHash, blockHash common.Hash,
err = ext.Sign(signature.TestKeyringPairAlice, o)
require.NoError(t, err)

extEnc, err := ctypes.EncodeToHex(ext)
extEnc, err := codec.EncodeToHex(ext)
require.NoError(t, err)

return extEnc
Expand Down
5 changes: 3 additions & 2 deletions tests/stress/stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
"github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -511,7 +512,7 @@ func TestSync_SubmitExtrinsic(t *testing.T) {
err = ext.Sign(signature.TestKeyringPairAlice, o)
require.NoError(t, err)

extEnc, err := types.EncodeToHex(ext)
extEnc, err := codec.EncodeToHex(ext)
require.NoError(t, err)

// get starting header so that we can lookup blocks by number later
Expand Down Expand Up @@ -674,7 +675,7 @@ func Test_SubmitAndWatchExtrinsic(t *testing.T) {
err = ext.Sign(signature.TestKeyringPairAlice, o)
require.NoError(t, err)

extEnc, err := types.EncodeToHex(ext)
extEnc, err := codec.EncodeToHex(ext)
require.NoError(t, err)

conn, _, err := websocket.DefaultDialer.Dial("ws://localhost:8546", nil)
Expand Down

0 comments on commit c01c4a3

Please sign in to comment.