client: rename CliContext to Context (#6290)
* Refactor CliContext as Context * Fix lint issues * Fix goimports * Fix gov tests * Resolved ci-lint issues * Add changelog * Rename cliCtx to clientCtx * Fix mocks and routes * Add changelog * Update changelog * Apply suggestions from code review Co-authored-by: Alessio Treglia <alessio@tendermint.com> * merge client/rpc/ro{ot,utes}.go * Update docs * client/rpc: remove redundant client/rpc.RegisterRPCRoutes * regenerate mocks * Update ADRs Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Alessio Treglia
Federico Kunze
mergify[bot]
parent
654b2fdd10
commit
39f53ac22f
@@ -1,11 +1,11 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: client/context/account_retriever.go
|
||||
// Source: client/account_retriever.go
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
|
||||
import (
|
||||
context "github.com/cosmos/cosmos-sdk/client/context"
|
||||
client "github.com/cosmos/cosmos-sdk/client"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
@@ -35,7 +35,7 @@ func (m *MockAccountRetriever) EXPECT() *MockAccountRetrieverMockRecorder {
|
||||
}
|
||||
|
||||
// EnsureExists mocks base method
|
||||
func (m *MockAccountRetriever) EnsureExists(nodeQuerier context.NodeQuerier, addr types.AccAddress) error {
|
||||
func (m *MockAccountRetriever) EnsureExists(nodeQuerier client.NodeQuerier, addr types.AccAddress) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "EnsureExists", nodeQuerier, addr)
|
||||
ret0, _ := ret[0].(error)
|
||||
@@ -49,7 +49,7 @@ func (mr *MockAccountRetrieverMockRecorder) EnsureExists(nodeQuerier, addr inter
|
||||
}
|
||||
|
||||
// GetAccountNumberSequence mocks base method
|
||||
func (m *MockAccountRetriever) GetAccountNumberSequence(nodeQuerier context.NodeQuerier, addr types.AccAddress) (uint64, uint64, error) {
|
||||
func (m *MockAccountRetriever) GetAccountNumberSequence(nodeQuerier client.NodeQuerier, addr types.AccAddress) (uint64, uint64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetAccountNumberSequence", nodeQuerier, addr)
|
||||
ret0, _ := ret[0].(uint64)
|
||||
|
||||
@@ -6,7 +6,7 @@ package mocks
|
||||
|
||||
import (
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
db "github.com/tendermint/tm-db"
|
||||
tm_db "github.com/tendermint/tm-db"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
@@ -106,10 +106,10 @@ func (mr *MockDBMockRecorder) Has(arg0 interface{}) *gomock.Call {
|
||||
}
|
||||
|
||||
// Iterator mocks base method
|
||||
func (m *MockDB) Iterator(arg0, arg1 []byte) (db.Iterator, error) {
|
||||
func (m *MockDB) Iterator(arg0, arg1 []byte) (tm_db.Iterator, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Iterator", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Iterator)
|
||||
ret0, _ := ret[0].(tm_db.Iterator)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
@@ -121,10 +121,10 @@ func (mr *MockDBMockRecorder) Iterator(arg0, arg1 interface{}) *gomock.Call {
|
||||
}
|
||||
|
||||
// NewBatch mocks base method
|
||||
func (m *MockDB) NewBatch() db.Batch {
|
||||
func (m *MockDB) NewBatch() tm_db.Batch {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "NewBatch")
|
||||
ret0, _ := ret[0].(db.Batch)
|
||||
ret0, _ := ret[0].(tm_db.Batch)
|
||||
return ret0
|
||||
}
|
||||
|
||||
@@ -149,10 +149,10 @@ func (mr *MockDBMockRecorder) Print() *gomock.Call {
|
||||
}
|
||||
|
||||
// ReverseIterator mocks base method
|
||||
func (m *MockDB) ReverseIterator(arg0, arg1 []byte) (db.Iterator, error) {
|
||||
func (m *MockDB) ReverseIterator(arg0, arg1 []byte) (tm_db.Iterator, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ReverseIterator", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Iterator)
|
||||
ret0, _ := ret[0].(tm_db.Iterator)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ package mocks
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
context "github.com/cosmos/cosmos-sdk/client/context"
|
||||
client "github.com/cosmos/cosmos-sdk/client"
|
||||
codec "github.com/cosmos/cosmos-sdk/codec"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
@@ -94,7 +94,7 @@ func (mr *MockAppModuleBasicMockRecorder) ValidateGenesis(arg0, arg1 interface{}
|
||||
}
|
||||
|
||||
// RegisterRESTRoutes mocks base method
|
||||
func (m *MockAppModuleBasic) RegisterRESTRoutes(arg0 context.CLIContext, arg1 *mux.Router) {
|
||||
func (m *MockAppModuleBasic) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1)
|
||||
}
|
||||
@@ -106,7 +106,7 @@ func (mr *MockAppModuleBasicMockRecorder) RegisterRESTRoutes(arg0, arg1 interfac
|
||||
}
|
||||
|
||||
// GetTxCmd mocks base method
|
||||
func (m *MockAppModuleBasic) GetTxCmd(arg0 context.CLIContext) *cobra.Command {
|
||||
func (m *MockAppModuleBasic) GetTxCmd(arg0 client.Context) *cobra.Command {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetTxCmd", arg0)
|
||||
ret0, _ := ret[0].(*cobra.Command)
|
||||
@@ -211,7 +211,7 @@ func (mr *MockAppModuleGenesisMockRecorder) ValidateGenesis(arg0, arg1 interface
|
||||
}
|
||||
|
||||
// RegisterRESTRoutes mocks base method
|
||||
func (m *MockAppModuleGenesis) RegisterRESTRoutes(arg0 context.CLIContext, arg1 *mux.Router) {
|
||||
func (m *MockAppModuleGenesis) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1)
|
||||
}
|
||||
@@ -223,7 +223,7 @@ func (mr *MockAppModuleGenesisMockRecorder) RegisterRESTRoutes(arg0, arg1 interf
|
||||
}
|
||||
|
||||
// GetTxCmd mocks base method
|
||||
func (m *MockAppModuleGenesis) GetTxCmd(arg0 context.CLIContext) *cobra.Command {
|
||||
func (m *MockAppModuleGenesis) GetTxCmd(arg0 client.Context) *cobra.Command {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetTxCmd", arg0)
|
||||
ret0, _ := ret[0].(*cobra.Command)
|
||||
@@ -356,7 +356,7 @@ func (mr *MockAppModuleMockRecorder) ValidateGenesis(arg0, arg1 interface{}) *go
|
||||
}
|
||||
|
||||
// RegisterRESTRoutes mocks base method
|
||||
func (m *MockAppModule) RegisterRESTRoutes(arg0 context.CLIContext, arg1 *mux.Router) {
|
||||
func (m *MockAppModule) RegisterRESTRoutes(arg0 client.Context, arg1 *mux.Router) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "RegisterRESTRoutes", arg0, arg1)
|
||||
}
|
||||
@@ -368,7 +368,7 @@ func (mr *MockAppModuleMockRecorder) RegisterRESTRoutes(arg0, arg1 interface{})
|
||||
}
|
||||
|
||||
// GetTxCmd mocks base method
|
||||
func (m *MockAppModule) GetTxCmd(arg0 context.CLIContext) *cobra.Command {
|
||||
func (m *MockAppModule) GetTxCmd(arg0 client.Context) *cobra.Command {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetTxCmd", arg0)
|
||||
ret0, _ := ret[0].(*cobra.Command)
|
||||
|
||||
Reference in New Issue
Block a user