diff --git a/client/cmd.go b/client/cmd.go index 61412200fd5..e817649d24d 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -168,7 +168,7 @@ func ReadPersistentCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Cont }))) } - grpcClient, err := grpc.Dial(grpcURI, dialOpts...) + grpcClient, err := grpc.NewClient(grpcURI, dialOpts...) if err != nil { return Context{}, err } diff --git a/client/config/config.go b/client/config/config.go index ae8cbb70584..893ddd7df88 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -175,7 +175,7 @@ func getGRPCClient(grpcConfig GRPCConfig) (*grpc.ClientConn, error) { } dialOptions := []grpc.DialOption{transport} - grpcClient, err := grpc.Dial(grpcConfig.Address, dialOptions...) + grpcClient, err := grpc.NewClient(grpcConfig.Address, dialOptions...) if err != nil { return nil, fmt.Errorf("failed to dial gRPC server at %s: %w", grpcConfig.Address, err) } diff --git a/client/v2/autocli/common_test.go b/client/v2/autocli/common_test.go index 2850abc226f..9e8613be07c 100644 --- a/client/v2/autocli/common_test.go +++ b/client/v2/autocli/common_test.go @@ -49,7 +49,7 @@ func initFixture(t *testing.T) *fixture { } }() - clientConn, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) + clientConn, err := grpc.NewClient(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) assert.NilError(t, err) encodingConfig := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, bank.AppModule{}) diff --git a/server/start.go b/server/start.go index a3cb688df66..cfed5a393a1 100644 --- a/server/start.go +++ b/server/start.go @@ -473,7 +473,7 @@ func startGrpcServer( } // if gRPC is enabled, configure gRPC client for gRPC gateway - grpcClient, err := grpc.Dial( + grpcClient, err := grpc.NewClient( config.Address, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions( diff --git a/store/db/rocksdb_noflag.go b/store/db/rocksdb_noflag.go index b51ff681a11..100171a077c 100644 --- a/store/db/rocksdb_noflag.go +++ b/store/db/rocksdb_noflag.go @@ -86,29 +86,3 @@ func (itr *rocksDBIterator) Close() error { func (itr *rocksDBIterator) assertIsValid() { panic("rocksdb must be built with -tags rocksdb") } - -type rocksDBBatch struct{} - -func (b *rocksDBBatch) Set(key, value []byte) error { - panic("rocksdb must be built with -tags rocksdb") -} - -func (b *rocksDBBatch) Delete(key []byte) error { - panic("rocksdb must be built with -tags rocksdb") -} - -func (b *rocksDBBatch) Write() error { - panic("rocksdb must be built with -tags rocksdb") -} - -func (b *rocksDBBatch) WriteSync() error { - panic("rocksdb must be built with -tags rocksdb") -} - -func (b *rocksDBBatch) Close() error { - panic("rocksdb must be built with -tags rocksdb") -} - -func (b *rocksDBBatch) GetByteSize() (int, error) { - panic("rocksdb must be built with -tags rocksdb") -} diff --git a/store/root/migrate_test.go b/store/root/migrate_test.go index 38f4568f21d..5999fd053e6 100644 --- a/store/root/migrate_test.go +++ b/store/root/migrate_test.go @@ -88,7 +88,7 @@ func (s *MigrateStoreTestSuite) TestMigrateState() { s.Require().NoError(err) // start the migration process - s.rootStore.StartMigration() + s.Require().NoError(s.rootStore.StartMigration()) // continue to apply changeset against the original store latestVersion := originalLatestVersion + 1 diff --git a/tests/integration/server/grpc/server_test.go b/tests/integration/server/grpc/server_test.go index 925805dbada..6ea705f4205 100644 --- a/tests/integration/server/grpc/server_test.go +++ b/tests/integration/server/grpc/server_test.go @@ -52,7 +52,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(err) val0 := s.network.GetValidators()[0] - s.conn, err = grpc.Dial( + s.conn, err = grpc.NewClient( val0.GetAppConfig().GRPC.Address, grpc.WithInsecure(), //nolint:staticcheck // ignore SA1019, we don't need to use a secure connection for tests grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.cfg.InterfaceRegistry).GRPCCodec())), diff --git a/tests/starship/tests/suite.go b/tests/starship/tests/suite.go index e9602e215e7..bc9644a29b0 100644 --- a/tests/starship/tests/suite.go +++ b/tests/starship/tests/suite.go @@ -55,7 +55,7 @@ func (s *TestSuite) SetupTest() { s.cdc = encodingConfig - grpcConn, err := grpc.Dial( + grpcConn, err := grpc.NewClient( fmt.Sprintf("127.0.0.1:%d", config.GetChain(chainID).Ports.Grpc), grpc.WithInsecure(), //nolint:staticcheck // ignore SA1019, we don't need to use a secure connection for tests grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.cdc.InterfaceRegistry).GRPCCodec()))) diff --git a/tools/hubl/internal/load.go b/tools/hubl/internal/load.go index eea3f62b071..9b0069ff6cc 100644 --- a/tools/hubl/internal/load.go +++ b/tools/hubl/internal/load.go @@ -174,7 +174,7 @@ func (c *ChainInfo) OpenClient() (*grpc.ClientConn, error) { } var err error - c.client, err = grpc.Dial(endpoint.Endpoint, grpc.WithTransportCredentials(creds)) + c.client, err = grpc.NewClient(endpoint.Endpoint, grpc.WithTransportCredentials(creds)) if err != nil { res = errors.Join(res, err) continue diff --git a/x/accounts/defaults/lockup/lockup.go b/x/accounts/defaults/lockup/lockup.go index c3daa2eb48f..71e7687c842 100644 --- a/x/accounts/defaults/lockup/lockup.go +++ b/x/accounts/defaults/lockup/lockup.go @@ -6,6 +6,8 @@ import ( "fmt" "time" + "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/collections" collcodec "cosmossdk.io/collections/codec" "cosmossdk.io/core/address" @@ -15,9 +17,8 @@ import ( "cosmossdk.io/x/accounts/accountstd" lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" banktypes "cosmossdk.io/x/bank/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/gogoproto/proto" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/accounts/defaults/lockup/protov2_wrapper.go b/x/accounts/defaults/lockup/protov2_wrapper.go index 782f9e30159..caee0c60398 100644 --- a/x/accounts/defaults/lockup/protov2_wrapper.go +++ b/x/accounts/defaults/lockup/protov2_wrapper.go @@ -1,12 +1,14 @@ package lockup import ( + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoiface" + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" stakingv1beta1 "cosmossdk.io/api/cosmos/staking/v1beta1" + sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/runtime/protoiface" ) type ProtoMsg = protoiface.MessageV1