From 152f2ac807a7a55e5e1a89fe83c57879475bd3b3 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 17 Sep 2021 14:24:05 -0400 Subject: [PATCH] s/abcicli/abciclient/ --- abci/client/client.go | 2 +- abci/client/creators.go | 2 +- abci/client/doc.go | 4 +- abci/client/grpc_client.go | 2 +- abci/client/local_client.go | 2 +- abci/client/mocks/client.go | 116 ++++++++++----------- abci/client/socket_client.go | 2 +- abci/client/socket_client_test.go | 8 +- abci/cmd/abci-cli/abci-cli.go | 6 +- abci/example/example_test.go | 4 +- abci/example/kvstore/kvstore_test.go | 14 +-- abci/tests/client_server_test.go | 4 +- abci/tests/server/client.go | 10 +- internal/blocksync/v0/reactor_test.go | 4 +- internal/blocksync/v2/reactor_test.go | 6 +- internal/consensus/byzantine_test.go | 6 +- internal/consensus/common_test.go | 6 +- internal/consensus/reactor_test.go | 6 +- internal/consensus/replay_stubs.go | 4 +- internal/consensus/replay_test.go | 12 +-- internal/consensus/wal_generator.go | 4 +- internal/mempool/v0/bench_test.go | 10 +- internal/mempool/v0/cache_test.go | 4 +- internal/mempool/v0/clist_mempool_test.go | 28 ++--- internal/mempool/v0/reactor_test.go | 4 +- internal/mempool/v1/mempool_test.go | 4 +- internal/proxy/app_conn.go | 49 +++++---- internal/proxy/app_conn_test.go | 16 +-- internal/proxy/client.go | 12 +-- internal/proxy/mocks/app_conn_consensus.go | 12 +-- internal/proxy/mocks/app_conn_mempool.go | 20 ++-- internal/proxy/mocks/client_creator.go | 10 +- internal/proxy/multi_app_conn.go | 18 ++-- node/node.go | 4 +- node/node_test.go | 8 +- node/public.go | 4 +- node/setup.go | 4 +- rpc/test/helpers.go | 4 +- state/execution_test.go | 12 +-- state/helpers_test.go | 4 +- test/e2e/app/main.go | 4 +- test/fuzz/mempool/v0/checktx.go | 4 +- test/fuzz/mempool/v1/checktx.go | 4 +- 43 files changed, 233 insertions(+), 230 deletions(-) diff --git a/abci/client/client.go b/abci/client/client.go index b6d34e422..93f8b9293 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -1,4 +1,4 @@ -package abcicli +package abciclient import ( "context" diff --git a/abci/client/creators.go b/abci/client/creators.go index 02e765bc7..d468fbc36 100644 --- a/abci/client/creators.go +++ b/abci/client/creators.go @@ -1,4 +1,4 @@ -package abcicli +package abciclient import ( "fmt" diff --git a/abci/client/doc.go b/abci/client/doc.go index eac40fe11..fd5a17075 100644 --- a/abci/client/doc.go +++ b/abci/client/doc.go @@ -1,4 +1,4 @@ -// Package abcicli provides an ABCI implementation in Go. +// Package abciclient provides an ABCI implementation in Go. // // There are 3 clients available: // 1. socket (unix or TCP) @@ -26,4 +26,4 @@ // // sync: waits for all Async calls to complete (essentially what Flush does in // the socket client) and calls Sync method. -package abcicli +package abciclient diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 31bd6fae1..2bfa047bd 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -1,4 +1,4 @@ -package abcicli +package abciclient import ( "context" diff --git a/abci/client/local_client.go b/abci/client/local_client.go index 69457b5b0..06ff8171c 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -1,4 +1,4 @@ -package abcicli +package abciclient import ( "context" diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 6726ce95e..664646e61 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" log "github.com/tendermint/tendermint/libs/log" @@ -20,15 +20,15 @@ type Client struct { } // ApplySnapshotChunkAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) ApplySnapshotChunkAsync(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*abcicli.ReqRes, error) { +func (_m *Client) ApplySnapshotChunkAsync(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -66,15 +66,15 @@ func (_m *Client) ApplySnapshotChunkSync(_a0 context.Context, _a1 types.RequestA } // BeginBlockAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) BeginBlockAsync(_a0 context.Context, _a1 types.RequestBeginBlock) (*abcicli.ReqRes, error) { +func (_m *Client) BeginBlockAsync(_a0 context.Context, _a1 types.RequestBeginBlock) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -112,15 +112,15 @@ func (_m *Client) BeginBlockSync(_a0 context.Context, _a1 types.RequestBeginBloc } // CheckTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abcicli.ReqRes, error) { +func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -158,15 +158,15 @@ func (_m *Client) CheckTxSync(_a0 context.Context, _a1 types.RequestCheckTx) (*t } // CommitAsync provides a mock function with given fields: _a0 -func (_m *Client) CommitAsync(_a0 context.Context) (*abcicli.ReqRes, error) { +func (_m *Client) CommitAsync(_a0 context.Context) (*abciclient.ReqRes, error) { ret := _m.Called(_a0) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context) *abciclient.ReqRes); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -204,15 +204,15 @@ func (_m *Client) CommitSync(_a0 context.Context) (*types.ResponseCommit, error) } // DeliverTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abcicli.ReqRes, error) { +func (_m *Client) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -250,15 +250,15 @@ func (_m *Client) DeliverTxSync(_a0 context.Context, _a1 types.RequestDeliverTx) } // EchoAsync provides a mock function with given fields: ctx, msg -func (_m *Client) EchoAsync(ctx context.Context, msg string) (*abcicli.ReqRes, error) { +func (_m *Client) EchoAsync(ctx context.Context, msg string) (*abciclient.ReqRes, error) { ret := _m.Called(ctx, msg) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, string) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, string) *abciclient.ReqRes); ok { r0 = rf(ctx, msg) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -296,15 +296,15 @@ func (_m *Client) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho } // EndBlockAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) EndBlockAsync(_a0 context.Context, _a1 types.RequestEndBlock) (*abcicli.ReqRes, error) { +func (_m *Client) EndBlockAsync(_a0 context.Context, _a1 types.RequestEndBlock) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -356,15 +356,15 @@ func (_m *Client) Error() error { } // FlushAsync provides a mock function with given fields: _a0 -func (_m *Client) FlushAsync(_a0 context.Context) (*abcicli.ReqRes, error) { +func (_m *Client) FlushAsync(_a0 context.Context) (*abciclient.ReqRes, error) { ret := _m.Called(_a0) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context) *abciclient.ReqRes); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -393,15 +393,15 @@ func (_m *Client) FlushSync(_a0 context.Context) error { } // InfoAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) InfoAsync(_a0 context.Context, _a1 types.RequestInfo) (*abcicli.ReqRes, error) { +func (_m *Client) InfoAsync(_a0 context.Context, _a1 types.RequestInfo) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -439,15 +439,15 @@ func (_m *Client) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*types.R } // InitChainAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) InitChainAsync(_a0 context.Context, _a1 types.RequestInitChain) (*abcicli.ReqRes, error) { +func (_m *Client) InitChainAsync(_a0 context.Context, _a1 types.RequestInitChain) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestInitChain) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestInitChain) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -499,15 +499,15 @@ func (_m *Client) IsRunning() bool { } // ListSnapshotsAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) ListSnapshotsAsync(_a0 context.Context, _a1 types.RequestListSnapshots) (*abcicli.ReqRes, error) { +func (_m *Client) ListSnapshotsAsync(_a0 context.Context, _a1 types.RequestListSnapshots) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -545,15 +545,15 @@ func (_m *Client) ListSnapshotsSync(_a0 context.Context, _a1 types.RequestListSn } // LoadSnapshotChunkAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) LoadSnapshotChunkAsync(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*abcicli.ReqRes, error) { +func (_m *Client) LoadSnapshotChunkAsync(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -591,15 +591,15 @@ func (_m *Client) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.RequestLo } // OfferSnapshotAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) OfferSnapshotAsync(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*abcicli.ReqRes, error) { +func (_m *Client) OfferSnapshotAsync(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -670,15 +670,15 @@ func (_m *Client) OnStop() { } // QueryAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) QueryAsync(_a0 context.Context, _a1 types.RequestQuery) (*abcicli.ReqRes, error) { +func (_m *Client) QueryAsync(_a0 context.Context, _a1 types.RequestQuery) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -751,7 +751,7 @@ func (_m *Client) SetLogger(_a0 log.Logger) { } // SetResponseCallback provides a mock function with given fields: _a0 -func (_m *Client) SetResponseCallback(_a0 abcicli.Callback) { +func (_m *Client) SetResponseCallback(_a0 abciclient.Callback) { _m.Called(_a0) } diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 3fef8540d..d6477062c 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -1,4 +1,4 @@ -package abcicli +package abciclient import ( "bufio" diff --git a/abci/client/socket_client_test.go b/abci/client/socket_client_test.go index d61d729e1..53ba7b672 100644 --- a/abci/client/socket_client_test.go +++ b/abci/client/socket_client_test.go @@ -1,4 +1,4 @@ -package abcicli_test +package abciclient_test import ( "context" @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/service" @@ -100,7 +100,7 @@ func TestHangingSyncCalls(t *testing.T) { } func setupClientServer(t *testing.T, app types.Application) ( - service.Service, abcicli.Client) { + service.Service, abciclient.Client) { // some port between 20k and 30k port := 20000 + rand.Int31()%10000 addr := fmt.Sprintf("localhost:%d", port) @@ -110,7 +110,7 @@ func setupClientServer(t *testing.T, app types.Application) ( err = s.Start() require.NoError(t, err) - c := abcicli.NewSocketClient(addr, true) + c := abciclient.NewSocketClient(addr, true) err = c.Start() require.NoError(t, err) diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index b9af27e22..9fae6fc05 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -15,7 +15,7 @@ import ( "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/server" @@ -27,7 +27,7 @@ import ( // client is a global variable so it can be reused by the console var ( - client abcicli.Client + client abciclient.Client logger log.Logger ctx = context.Background() @@ -67,7 +67,7 @@ var RootCmd = &cobra.Command{ if client == nil { var err error - client, err = abcicli.NewClient(flagAddress, flagAbci, false) + client, err = abciclient.NewClient(flagAddress, flagAbci, false) if err != nil { return err } diff --git a/abci/example/example_test.go b/abci/example/example_test.go index fdfc5515e..cde8a15b1 100644 --- a/abci/example/example_test.go +++ b/abci/example/example_test.go @@ -17,7 +17,7 @@ import ( "github.com/tendermint/tendermint/libs/log" tmnet "github.com/tendermint/tendermint/libs/net" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/example/kvstore" abciserver "github.com/tendermint/tendermint/abci/server" @@ -61,7 +61,7 @@ func testStream(t *testing.T, app types.Application) { }) // Connect to the socket - client := abcicli.NewSocketClient(socket, false) + client := abciclient.NewSocketClient(socket, false) client.SetLogger(log.TestingLogger().With("module", "abci-client")) err = client.Start() require.NoError(t, err) diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index a52312a00..9d026bd87 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -12,7 +12,7 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/code" abciserver "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/abci/types" @@ -229,7 +229,7 @@ func valsEqual(t *testing.T, vals1, vals2 []types.ValidatorUpdate) { } } -func makeSocketClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) { +func makeSocketClientServer(app types.Application, name string) (abciclient.Client, service.Service, error) { // Start the listener socket := fmt.Sprintf("unix://%s.sock", name) logger := log.TestingLogger() @@ -241,7 +241,7 @@ func makeSocketClientServer(app types.Application, name string) (abcicli.Client, } // Connect to the socket - client := abcicli.NewSocketClient(socket, false) + client := abciclient.NewSocketClient(socket, false) client.SetLogger(logger.With("module", "abci-client")) if err := client.Start(); err != nil { if err = server.Stop(); err != nil { @@ -253,7 +253,7 @@ func makeSocketClientServer(app types.Application, name string) (abcicli.Client, return client, server, nil } -func makeGRPCClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) { +func makeGRPCClientServer(app types.Application, name string) (abciclient.Client, service.Service, error) { // Start the listener socket := fmt.Sprintf("unix://%s.sock", name) logger := log.TestingLogger() @@ -265,7 +265,7 @@ func makeGRPCClientServer(app types.Application, name string) (abcicli.Client, s return nil, nil, err } - client := abcicli.NewGRPCClient(socket, true) + client := abciclient.NewGRPCClient(socket, true) client.SetLogger(logger.With("module", "abci-client")) if err := client.Start(); err != nil { if err := server.Stop(); err != nil { @@ -313,7 +313,7 @@ func TestClientServer(t *testing.T) { runClientTests(t, gclient) } -func runClientTests(t *testing.T, client abcicli.Client) { +func runClientTests(t *testing.T, client abciclient.Client) { // run some tests.... key := testKey value := key @@ -325,7 +325,7 @@ func runClientTests(t *testing.T, client abcicli.Client) { testClient(t, client, tx, key, value) } -func testClient(t *testing.T, app abcicli.Client, tx []byte, key, value string) { +func testClient(t *testing.T, app abciclient.Client, tx []byte, key, value string) { ar, err := app.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: tx}) require.NoError(t, err) require.False(t, ar.IsErr(), ar) diff --git a/abci/tests/client_server_test.go b/abci/tests/client_server_test.go index 2ef64e66a..62dc6e07e 100644 --- a/abci/tests/client_server_test.go +++ b/abci/tests/client_server_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - abciclient "github.com/tendermint/tendermint/abci/client" + abciclientent "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abciserver "github.com/tendermint/tendermint/abci/server" ) @@ -20,7 +20,7 @@ func TestClientServerNoAddrPrefix(t *testing.T) { err = server.Start() assert.NoError(t, err, "expected no error on server.Start") - client, err := abciclient.NewClient(addr, transport, true) + client, err := abciclientent.NewClient(addr, transport, true) assert.NoError(t, err, "expected no error on NewClient") err = client.Start() assert.NoError(t, err, "expected no error on client.Start") diff --git a/abci/tests/server/client.go b/abci/tests/server/client.go index 10d4a3e58..23adbe80d 100644 --- a/abci/tests/server/client.go +++ b/abci/tests/server/client.go @@ -7,14 +7,14 @@ import ( "fmt" mrand "math/rand" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/types" tmrand "github.com/tendermint/tendermint/libs/rand" ) var ctx = context.Background() -func InitChain(client abcicli.Client) error { +func InitChain(client abciclient.Client) error { total := 10 vals := make([]types.ValidatorUpdate, total) for i := 0; i < total; i++ { @@ -34,7 +34,7 @@ func InitChain(client abcicli.Client) error { return nil } -func Commit(client abcicli.Client, hashExp []byte) error { +func Commit(client abciclient.Client, hashExp []byte) error { res, err := client.CommitSync(ctx) data := res.Data if err != nil { @@ -51,7 +51,7 @@ func Commit(client abcicli.Client, hashExp []byte) error { return nil } -func DeliverTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { +func DeliverTx(client abciclient.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { res, _ := client.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: txBytes}) code, data, log := res.Code, res.Data, res.Log if code != codeExp { @@ -70,7 +70,7 @@ func DeliverTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp [] return nil } -func CheckTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { +func CheckTx(client abciclient.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { res, _ := client.CheckTxSync(ctx, types.RequestCheckTx{Tx: txBytes}) code, data, log := res.Code, res.Data, res.Log if code != codeExp { diff --git a/internal/blocksync/v0/reactor_test.go b/internal/blocksync/v0/reactor_test.go index 64ee7b702..356bc8fcd 100644 --- a/internal/blocksync/v0/reactor_test.go +++ b/internal/blocksync/v0/reactor_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" cons "github.com/tendermint/tendermint/internal/consensus" @@ -98,7 +98,7 @@ func (rts *reactorTestSuite) addNode(t *testing.T, t.Helper() rts.nodes = append(rts.nodes, nodeID) - rts.app[nodeID] = proxy.NewAppConns(abcicli.NewLocalClientCreator(&abci.BaseApplication{})) + rts.app[nodeID] = proxy.NewAppConns(abciclient.NewLocalClientCreator(&abci.BaseApplication{})) require.NoError(t, rts.app[nodeID].Start()) blockDB := dbm.NewMemDB() diff --git a/internal/blocksync/v2/reactor_test.go b/internal/blocksync/v2/reactor_test.go index 62a9c07b2..e986d7dae 100644 --- a/internal/blocksync/v2/reactor_test.go +++ b/internal/blocksync/v2/reactor_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/blocksync/v2/internal/behavior" @@ -164,7 +164,7 @@ func newTestReactor(t *testing.T, p testReactorParams) *BlockchainReactor { appl = &mockBlockApplier{} } else { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.NoError(t, err) @@ -483,7 +483,7 @@ func newReactorStore( require.Len(t, privVals, 1) app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() if err != nil { diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index 1c6ec858b..f4a74ea6f 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/evidence" tmsync "github.com/tendermint/tendermint/internal/libs/sync" @@ -62,8 +62,8 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { // one for mempool, one for consensus mtx := new(tmsync.RWMutex) - proxyAppConnMem := abcicli.NewLocalClient(mtx, app) - proxyAppConnCon := abcicli.NewLocalClient(mtx, app) + proxyAppConnMem := abciclient.NewLocalClient(mtx, app) + proxyAppConnCon := abciclient.NewLocalClient(mtx, app) // Make Mempool mempool := mempoolv0.NewCListMempool(thisConfig.Mempool, proxyAppConnMem, 0) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 17ba1ce2e..f5c31d02a 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -18,7 +18,7 @@ import ( dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" @@ -410,8 +410,8 @@ func newStateWithConfigAndBlockStore( ) *State { // one for mempool, one for consensus mtx := new(tmsync.RWMutex) - proxyAppConnMem := abcicli.NewLocalClient(mtx, app) - proxyAppConnCon := abcicli.NewLocalClient(mtx, app) + proxyAppConnMem := abciclient.NewLocalClient(mtx, app) + proxyAppConnCon := abciclient.NewLocalClient(mtx, app) // Make Mempool mempool := mempoolv0.NewCListMempool(thisConfig.Mempool, proxyAppConnMem, 0) diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index 8c70ca1d5..571b6d832 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" @@ -347,8 +347,8 @@ func TestReactorWithEvidence(t *testing.T) { // one for mempool, one for consensus mtx := new(tmsync.RWMutex) - proxyAppConnMem := abcicli.NewLocalClient(mtx, app) - proxyAppConnCon := abcicli.NewLocalClient(mtx, app) + proxyAppConnMem := abciclient.NewLocalClient(mtx, app) + proxyAppConnCon := abciclient.NewLocalClient(mtx, app) mempool := mempoolv0.NewCListMempool(thisConfig.Mempool, proxyAppConnMem, 0) mempool.SetLogger(log.TestingLogger().With("module", "mempool")) diff --git a/internal/consensus/replay_stubs.go b/internal/consensus/replay_stubs.go index ebcd536b9..7d382ef8f 100644 --- a/internal/consensus/replay_stubs.go +++ b/internal/consensus/replay_stubs.go @@ -3,7 +3,7 @@ package consensus import ( "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/libs/clist" mempl "github.com/tendermint/tendermint/internal/mempool" @@ -54,7 +54,7 @@ func (emptyMempool) CloseWAL() {} // the real app. func newMockProxyApp(appHash []byte, abciResponses *tmstate.ABCIResponses) proxy.AppConnConsensus { - clientCreator := abcicli.NewLocalClientCreator(&mockProxyApp{ + clientCreator := abciclient.NewLocalClientCreator(&mockProxyApp{ appHash: appHash, abciResponses: abciResponses, }) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 09620b8cf..099fec7f4 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" @@ -741,7 +741,7 @@ func testHandshakeReplay(t *testing.T, sim *simulatorTestSuite, nBlocks int, mod filepath.Join(config.DBDir(), fmt.Sprintf("replay_test_%d_%d_a_r%d", nBlocks, mode, rand.Int()))) t.Cleanup(func() { require.NoError(t, kvstoreApp.Close()) }) - clientCreator2 := abcicli.NewLocalClientCreator(kvstoreApp) + clientCreator2 := abciclient.NewLocalClientCreator(kvstoreApp) if nBlocks > 0 { // run nBlocks against a new client to build up the app state. // use a throwaway tendermint state @@ -891,7 +891,7 @@ func buildTMStateFromChain( kvstoreApp := kvstore.NewPersistentKVStoreApplication( filepath.Join(config.DBDir(), fmt.Sprintf("replay_test_%d_%d_t", nBlocks, mode))) defer kvstoreApp.Close() - clientCreator := abcicli.NewLocalClientCreator(kvstoreApp) + clientCreator := abciclient.NewLocalClientCreator(kvstoreApp) proxyApp := proxy.NewAppConns(clientCreator) if err := proxyApp.Start(); err != nil { @@ -959,7 +959,7 @@ func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { // - 0x03 { app := &badApp{numBlocks: 3, allHashesAreWrong: true} - clientCreator := abcicli.NewLocalClientCreator(app) + clientCreator := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(clientCreator) err := proxyApp.Start() require.NoError(t, err) @@ -983,7 +983,7 @@ func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { // - RANDOM HASH { app := &badApp{numBlocks: 3, onlyLastHashIsWrong: true} - clientCreator := abcicli.NewLocalClientCreator(app) + clientCreator := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(clientCreator) err := proxyApp.Start() require.NoError(t, err) @@ -1226,7 +1226,7 @@ func TestHandshakeUpdatesValidators(t *testing.T) { val, _ := factory.RandValidator(true, 10) vals := types.NewValidatorSet([]*types.Validator{val}) app := &initChainApp{vals: types.TM2PB.ValidatorUpdates(vals)} - clientCreator := abcicli.NewLocalClientCreator(app) + clientCreator := abciclient.NewLocalClientCreator(app) config := ResetConfig("handshake_test_") t.Cleanup(func() { _ = os.RemoveAll(config.RootDir) }) diff --git a/internal/consensus/wal_generator.go b/internal/consensus/wal_generator.go index 5234d17f6..94070bd4e 100644 --- a/internal/consensus/wal_generator.go +++ b/internal/consensus/wal_generator.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" db "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/proxy" @@ -65,7 +65,7 @@ func WALGenerateNBlocks(t *testing.T, wr io.Writer, numBlocks int) (err error) { blockStore := store.NewBlockStore(blockStoreDB) - proxyApp := proxy.NewAppConns(abcicli.NewLocalClientCreator(app)) + proxyApp := proxy.NewAppConns(abciclient.NewLocalClientCreator(app)) proxyApp.SetLogger(logger.With("module", "proxy")) if err := proxyApp.Start(); err != nil { return fmt.Errorf("failed to start proxy app connections: %w", err) diff --git a/internal/mempool/v0/bench_test.go b/internal/mempool/v0/bench_test.go index 6b5853d3d..5b8901e12 100644 --- a/internal/mempool/v0/bench_test.go +++ b/internal/mempool/v0/bench_test.go @@ -6,14 +6,14 @@ import ( "sync/atomic" "testing" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/internal/mempool" ) func BenchmarkReap(b *testing.B) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() mp.config.Size = 100000 @@ -34,7 +34,7 @@ func BenchmarkReap(b *testing.B) { func BenchmarkCheckTx(b *testing.B) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -56,7 +56,7 @@ func BenchmarkCheckTx(b *testing.B) { func BenchmarkParallelCheckTx(b *testing.B) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -81,7 +81,7 @@ func BenchmarkParallelCheckTx(b *testing.B) { func BenchmarkCheckDuplicateTx(b *testing.B) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() diff --git a/internal/mempool/v0/cache_test.go b/internal/mempool/v0/cache_test.go index 93a848dc1..2dea69ff5 100644 --- a/internal/mempool/v0/cache_test.go +++ b/internal/mempool/v0/cache_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/mempool" @@ -16,7 +16,7 @@ import ( func TestCacheAfterUpdate(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() diff --git a/internal/mempool/v0/clist_mempool_test.go b/internal/mempool/v0/clist_mempool_test.go index 774866836..295fdce1b 100644 --- a/internal/mempool/v0/clist_mempool_test.go +++ b/internal/mempool/v0/clist_mempool_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abciserver "github.com/tendermint/tendermint/abci/server" abci "github.com/tendermint/tendermint/abci/types" @@ -31,11 +31,11 @@ import ( // test. type cleanupFunc func() -func newMempoolWithApp(cc abcicli.ClientCreator) (*CListMempool, cleanupFunc) { +func newMempoolWithApp(cc abciclient.ClientCreator) (*CListMempool, cleanupFunc) { return newMempoolWithAppAndConfig(cc, cfg.ResetTestRoot("mempool_test")) } -func newMempoolWithAppAndConfig(cc abcicli.ClientCreator, config *cfg.Config) (*CListMempool, cleanupFunc) { +func newMempoolWithAppAndConfig(cc abciclient.ClientCreator, config *cfg.Config) (*CListMempool, cleanupFunc) { appConnMem, _ := cc.NewABCIClient() appConnMem.SetLogger(log.TestingLogger().With("module", "abci-client", "connection", "mempool")) err := appConnMem.Start() @@ -92,7 +92,7 @@ func checkTxs(t *testing.T, mp mempool.Mempool, count int, peerID uint16) types. func TestReapMaxBytesMaxGas(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -141,7 +141,7 @@ func TestReapMaxBytesMaxGas(t *testing.T) { func TestMempoolFilters(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() emptyTxArr := []types.Tx{[]byte{}} @@ -180,7 +180,7 @@ func TestMempoolFilters(t *testing.T) { func TestMempoolUpdate(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -216,7 +216,7 @@ func TestMempoolUpdate(t *testing.T) { func TestMempool_KeepInvalidTxsInCache(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) wcfg := cfg.DefaultConfig() wcfg.Mempool.KeepInvalidTxsInCache = true mp, cleanup := newMempoolWithAppAndConfig(cc, wcfg) @@ -264,7 +264,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { func TestTxsAvailable(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() mp.EnableTxsAvailable() @@ -308,7 +308,7 @@ func TestTxsAvailable(t *testing.T) { func TestSerialReap(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -419,7 +419,7 @@ func TestSerialReap(t *testing.T) { func TestMempool_CheckTxChecksTxSize(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) mempl, cleanup := newMempoolWithApp(cc) defer cleanup() @@ -464,7 +464,7 @@ func TestMempool_CheckTxChecksTxSize(t *testing.T) { func TestMempoolTxsBytes(t *testing.T) { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) config := cfg.ResetTestRoot("mempool_test") config.Mempool.MaxTxsBytes = 10 mp, cleanup := newMempoolWithAppAndConfig(cc, config) @@ -507,7 +507,7 @@ func TestMempoolTxsBytes(t *testing.T) { // 6. zero after tx is rechecked and removed due to not being valid anymore app2 := kvstore.NewApplication() - cc = abcicli.NewLocalClientCreator(app2) + cc = abciclient.NewLocalClientCreator(app2) mp, cleanup = newMempoolWithApp(cc) defer cleanup() @@ -597,10 +597,10 @@ func newRemoteApp( addr string, app abci.Application, ) ( - clientCreator abcicli.ClientCreator, + clientCreator abciclient.ClientCreator, server service.Service, ) { - clientCreator = abcicli.NewRemoteClientCreator(addr, "socket", true) + clientCreator = abciclient.NewRemoteClientCreator(addr, "socket", true) // Start server server = abciserver.NewSocketServer(addr, app) diff --git a/internal/mempool/v0/reactor_test.go b/internal/mempool/v0/reactor_test.go index 69bec1b8d..9935876fe 100644 --- a/internal/mempool/v0/reactor_test.go +++ b/internal/mempool/v0/reactor_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" @@ -55,7 +55,7 @@ func setup(t *testing.T, cfg *cfg.MempoolConfig, numNodes int, chBuf uint) *reac for nodeID := range rts.network.Nodes { rts.kvstores[nodeID] = kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(rts.kvstores[nodeID]) + cc := abciclient.NewLocalClientCreator(rts.kvstores[nodeID]) mempool, memCleanup := newMempoolWithApp(cc) t.Cleanup(memCleanup) diff --git a/internal/mempool/v1/mempool_test.go b/internal/mempool/v1/mempool_test.go index 0da7ce7d8..931938da8 100644 --- a/internal/mempool/v1/mempool_test.go +++ b/internal/mempool/v1/mempool_test.go @@ -15,7 +15,7 @@ import ( "time" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" @@ -76,7 +76,7 @@ func setup(t testing.TB, cacheSize int, options ...TxMempoolOption) *TxMempool { t.Helper() app := &application{kvstore.NewApplication()} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) cfg := config.ResetTestRoot(strings.ReplaceAll(t.Name(), "/", "|")) cfg.Mempool.CacheSize = cacheSize diff --git a/internal/proxy/app_conn.go b/internal/proxy/app_conn.go index 8eb90daf3..39860e2a2 100644 --- a/internal/proxy/app_conn.go +++ b/internal/proxy/app_conn.go @@ -3,7 +3,7 @@ package proxy import ( "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/types" ) @@ -13,25 +13,25 @@ import ( // Enforce which abci msgs can be sent on a connection at the type level type AppConnConsensus interface { - SetResponseCallback(abcicli.Callback) + SetResponseCallback(abciclient.Callback) Error() error InitChainSync(context.Context, types.RequestInitChain) (*types.ResponseInitChain, error) BeginBlockSync(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error) - DeliverTxAsync(context.Context, types.RequestDeliverTx) (*abcicli.ReqRes, error) + DeliverTxAsync(context.Context, types.RequestDeliverTx) (*abciclient.ReqRes, error) EndBlockSync(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error) CommitSync(context.Context) (*types.ResponseCommit, error) } type AppConnMempool interface { - SetResponseCallback(abcicli.Callback) + SetResponseCallback(abciclient.Callback) Error() error - CheckTxAsync(context.Context, types.RequestCheckTx) (*abcicli.ReqRes, error) + CheckTxAsync(context.Context, types.RequestCheckTx) (*abciclient.ReqRes, error) CheckTxSync(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error) - FlushAsync(context.Context) (*abcicli.ReqRes, error) + FlushAsync(context.Context) (*abciclient.ReqRes, error) FlushSync(context.Context) error } @@ -53,19 +53,19 @@ type AppConnSnapshot interface { } //----------------------------------------------------------------------------------------- -// Implements AppConnConsensus (subset of abcicli.Client) +// Implements AppConnConsensus (subset of abciclient.Client) type appConnConsensus struct { - appConn abcicli.Client + appConn abciclient.Client } -func NewAppConnConsensus(appConn abcicli.Client) AppConnConsensus { +func NewAppConnConsensus(appConn abciclient.Client) AppConnConsensus { return &appConnConsensus{ appConn: appConn, } } -func (app *appConnConsensus) SetResponseCallback(cb abcicli.Callback) { +func (app *appConnConsensus) SetResponseCallback(cb abciclient.Callback) { app.appConn.SetResponseCallback(cb) } @@ -87,7 +87,10 @@ func (app *appConnConsensus) BeginBlockSync( return app.appConn.BeginBlockSync(ctx, req) } -func (app *appConnConsensus) DeliverTxAsync(ctx context.Context, req types.RequestDeliverTx) (*abcicli.ReqRes, error) { +func (app *appConnConsensus) DeliverTxAsync( + ctx context.Context, + req types.RequestDeliverTx, +) (*abciclient.ReqRes, error) { return app.appConn.DeliverTxAsync(ctx, req) } @@ -103,19 +106,19 @@ func (app *appConnConsensus) CommitSync(ctx context.Context) (*types.ResponseCom } //------------------------------------------------ -// Implements AppConnMempool (subset of abcicli.Client) +// Implements AppConnMempool (subset of abciclient.Client) type appConnMempool struct { - appConn abcicli.Client + appConn abciclient.Client } -func NewAppConnMempool(appConn abcicli.Client) AppConnMempool { +func NewAppConnMempool(appConn abciclient.Client) AppConnMempool { return &appConnMempool{ appConn: appConn, } } -func (app *appConnMempool) SetResponseCallback(cb abcicli.Callback) { +func (app *appConnMempool) SetResponseCallback(cb abciclient.Callback) { app.appConn.SetResponseCallback(cb) } @@ -123,7 +126,7 @@ func (app *appConnMempool) Error() error { return app.appConn.Error() } -func (app *appConnMempool) FlushAsync(ctx context.Context) (*abcicli.ReqRes, error) { +func (app *appConnMempool) FlushAsync(ctx context.Context) (*abciclient.ReqRes, error) { return app.appConn.FlushAsync(ctx) } @@ -131,7 +134,7 @@ func (app *appConnMempool) FlushSync(ctx context.Context) error { return app.appConn.FlushSync(ctx) } -func (app *appConnMempool) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*abcicli.ReqRes, error) { +func (app *appConnMempool) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*abciclient.ReqRes, error) { return app.appConn.CheckTxAsync(ctx, req) } @@ -140,13 +143,13 @@ func (app *appConnMempool) CheckTxSync(ctx context.Context, req types.RequestChe } //------------------------------------------------ -// Implements AppConnQuery (subset of abcicli.Client) +// Implements AppConnQuery (subset of abciclient.Client) type appConnQuery struct { - appConn abcicli.Client + appConn abciclient.Client } -func NewAppConnQuery(appConn abcicli.Client) AppConnQuery { +func NewAppConnQuery(appConn abciclient.Client) AppConnQuery { return &appConnQuery{ appConn: appConn, } @@ -169,13 +172,13 @@ func (app *appConnQuery) QuerySync(ctx context.Context, reqQuery types.RequestQu } //------------------------------------------------ -// Implements AppConnSnapshot (subset of abcicli.Client) +// Implements AppConnSnapshot (subset of abciclient.Client) type appConnSnapshot struct { - appConn abcicli.Client + appConn abciclient.Client } -func NewAppConnSnapshot(appConn abcicli.Client) AppConnSnapshot { +func NewAppConnSnapshot(appConn abciclient.Client) AppConnSnapshot { return &appConnSnapshot{ appConn: appConn, } diff --git a/internal/proxy/app_conn_test.go b/internal/proxy/app_conn_test.go index 87a6f2d55..aa2fc2f35 100644 --- a/internal/proxy/app_conn_test.go +++ b/internal/proxy/app_conn_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/abci/types" @@ -17,20 +17,20 @@ import ( //---------------------------------------- type appConnTestI interface { - EchoAsync(ctx context.Context, msg string) (*abcicli.ReqRes, error) + EchoAsync(ctx context.Context, msg string) (*abciclient.ReqRes, error) FlushSync(context.Context) error InfoSync(context.Context, types.RequestInfo) (*types.ResponseInfo, error) } type appConnTest struct { - appConn abcicli.Client + appConn abciclient.Client } -func newAppConnTest(appConn abcicli.Client) appConnTestI { +func newAppConnTest(appConn abciclient.Client) appConnTestI { return &appConnTest{appConn} } -func (app *appConnTest) EchoAsync(ctx context.Context, msg string) (*abcicli.ReqRes, error) { +func (app *appConnTest) EchoAsync(ctx context.Context, msg string) (*abciclient.ReqRes, error) { return app.appConn.EchoAsync(ctx, msg) } @@ -48,7 +48,7 @@ var SOCKET = "socket" func TestEcho(t *testing.T) { sockPath := fmt.Sprintf("unix:///tmp/echo_%v.sock", tmrand.Str(6)) - clientCreator := abcicli.NewRemoteClientCreator(sockPath, SOCKET, true) + clientCreator := abciclient.NewRemoteClientCreator(sockPath, SOCKET, true) // Start server s := server.NewSocketServer(sockPath, kvstore.NewApplication()) @@ -96,7 +96,7 @@ func TestEcho(t *testing.T) { func BenchmarkEcho(b *testing.B) { b.StopTimer() // Initialize sockPath := fmt.Sprintf("unix:///tmp/echo_%v.sock", tmrand.Str(6)) - clientCreator := abcicli.NewRemoteClientCreator(sockPath, SOCKET, true) + clientCreator := abciclient.NewRemoteClientCreator(sockPath, SOCKET, true) // Start server s := server.NewSocketServer(sockPath, kvstore.NewApplication()) @@ -149,7 +149,7 @@ func BenchmarkEcho(b *testing.B) { func TestInfo(t *testing.T) { sockPath := fmt.Sprintf("unix:///tmp/echo_%v.sock", tmrand.Str(6)) - clientCreator := abcicli.NewRemoteClientCreator(sockPath, SOCKET, true) + clientCreator := abciclient.NewRemoteClientCreator(sockPath, SOCKET, true) // Start server s := server.NewSocketServer(sockPath, kvstore.NewApplication()) diff --git a/internal/proxy/client.go b/internal/proxy/client.go index f05ab7adc..329d715c9 100644 --- a/internal/proxy/client.go +++ b/internal/proxy/client.go @@ -3,7 +3,7 @@ package proxy import ( "io" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/types" ) @@ -14,18 +14,18 @@ import ( // // The Closer is a noop except for persistent_kvstore applications, // which will clean up the store. -func DefaultClientCreator(addr, transport, dbDir string) (abcicli.ClientCreator, io.Closer) { +func DefaultClientCreator(addr, transport, dbDir string) (abciclient.ClientCreator, io.Closer) { switch addr { case "kvstore": - return abcicli.NewLocalClientCreator(kvstore.NewApplication()), noopCloser{} + return abciclient.NewLocalClientCreator(kvstore.NewApplication()), noopCloser{} case "persistent_kvstore": app := kvstore.NewPersistentKVStoreApplication(dbDir) - return abcicli.NewLocalClientCreator(app), app + return abciclient.NewLocalClientCreator(app), app case "noop": - return abcicli.NewLocalClientCreator(types.NewBaseApplication()), noopCloser{} + return abciclient.NewLocalClientCreator(types.NewBaseApplication()), noopCloser{} default: mustConnect := false // loop retrying - return abcicli.NewRemoteClientCreator(addr, transport, mustConnect), noopCloser{} + return abciclient.NewRemoteClientCreator(addr, transport, mustConnect), noopCloser{} } } diff --git a/internal/proxy/mocks/app_conn_consensus.go b/internal/proxy/mocks/app_conn_consensus.go index 03207706e..fa93b0931 100644 --- a/internal/proxy/mocks/app_conn_consensus.go +++ b/internal/proxy/mocks/app_conn_consensus.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" mock "github.com/stretchr/testify/mock" @@ -64,15 +64,15 @@ func (_m *AppConnConsensus) CommitSync(_a0 context.Context) (*types.ResponseComm } // DeliverTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abcicli.ReqRes, error) { +func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -147,6 +147,6 @@ func (_m *AppConnConsensus) InitChainSync(_a0 context.Context, _a1 types.Request } // SetResponseCallback provides a mock function with given fields: _a0 -func (_m *AppConnConsensus) SetResponseCallback(_a0 abcicli.Callback) { +func (_m *AppConnConsensus) SetResponseCallback(_a0 abciclient.Callback) { _m.Called(_a0) } diff --git a/internal/proxy/mocks/app_conn_mempool.go b/internal/proxy/mocks/app_conn_mempool.go index 2505160d6..5429d8f90 100644 --- a/internal/proxy/mocks/app_conn_mempool.go +++ b/internal/proxy/mocks/app_conn_mempool.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" mock "github.com/stretchr/testify/mock" @@ -18,15 +18,15 @@ type AppConnMempool struct { } // CheckTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abcicli.ReqRes, error) { +func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abciclient.ReqRes, error) { ret := _m.Called(_a0, _a1) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abciclient.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -78,15 +78,15 @@ func (_m *AppConnMempool) Error() error { } // FlushAsync provides a mock function with given fields: _a0 -func (_m *AppConnMempool) FlushAsync(_a0 context.Context) (*abcicli.ReqRes, error) { +func (_m *AppConnMempool) FlushAsync(_a0 context.Context) (*abciclient.ReqRes, error) { ret := _m.Called(_a0) - var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(context.Context) *abcicli.ReqRes); ok { + var r0 *abciclient.ReqRes + if rf, ok := ret.Get(0).(func(context.Context) *abciclient.ReqRes); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*abcicli.ReqRes) + r0 = ret.Get(0).(*abciclient.ReqRes) } } @@ -115,6 +115,6 @@ func (_m *AppConnMempool) FlushSync(_a0 context.Context) error { } // SetResponseCallback provides a mock function with given fields: _a0 -func (_m *AppConnMempool) SetResponseCallback(_a0 abcicli.Callback) { +func (_m *AppConnMempool) SetResponseCallback(_a0 abciclient.Callback) { _m.Called(_a0) } diff --git a/internal/proxy/mocks/client_creator.go b/internal/proxy/mocks/client_creator.go index 0e4157c2f..53bcf942e 100644 --- a/internal/proxy/mocks/client_creator.go +++ b/internal/proxy/mocks/client_creator.go @@ -4,7 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" ) // ClientCreator is an autogenerated mock type for the ClientCreator type @@ -13,15 +13,15 @@ type ClientCreator struct { } // NewABCIClient provides a mock function with given fields: -func (_m *ClientCreator) NewABCIClient() (abcicli.Client, error) { +func (_m *ClientCreator) NewABCIClient() (abciclient.Client, error) { ret := _m.Called() - var r0 abcicli.Client - if rf, ok := ret.Get(0).(func() abcicli.Client); ok { + var r0 abciclient.Client + if rf, ok := ret.Get(0).(func() abciclient.Client); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(abcicli.Client) + r0 = ret.Get(0).(abciclient.Client) } } diff --git a/internal/proxy/multi_app_conn.go b/internal/proxy/multi_app_conn.go index 11517c365..dead9035d 100644 --- a/internal/proxy/multi_app_conn.go +++ b/internal/proxy/multi_app_conn.go @@ -5,7 +5,7 @@ import ( "os" "syscall" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" tmlog "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" ) @@ -33,7 +33,7 @@ type AppConns interface { } // NewAppConns calls NewMultiAppConn. -func NewAppConns(clientCreator abcicli.ClientCreator) AppConns { +func NewAppConns(clientCreator abciclient.ClientCreator) AppConns { return NewMultiAppConn(clientCreator) } @@ -50,16 +50,16 @@ type multiAppConn struct { queryConn AppConnQuery snapshotConn AppConnSnapshot - consensusConnClient abcicli.Client - mempoolConnClient abcicli.Client - queryConnClient abcicli.Client - snapshotConnClient abcicli.Client + consensusConnClient abciclient.Client + mempoolConnClient abciclient.Client + queryConnClient abciclient.Client + snapshotConnClient abciclient.Client - clientCreator abcicli.ClientCreator + clientCreator abciclient.ClientCreator } // NewMultiAppConn makes all necessary abci connections to the application. -func NewMultiAppConn(clientCreator abcicli.ClientCreator) AppConns { +func NewMultiAppConn(clientCreator abciclient.ClientCreator) AppConns { multiAppConn := &multiAppConn{ clientCreator: clientCreator, } @@ -178,7 +178,7 @@ func (app *multiAppConn) stopAllClients() { } } -func (app *multiAppConn) abciClientFor(conn string) (abcicli.Client, error) { +func (app *multiAppConn) abciClientFor(conn string) (abciclient.Client, error) { c, err := app.clientCreator.NewABCIClient() if err != nil { return nil, fmt.Errorf("error creating ABCI client (%s connection): %w", conn, err) diff --git a/node/node.go b/node/node.go index c3a625188..63772b0fe 100644 --- a/node/node.go +++ b/node/node.go @@ -14,7 +14,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/cors" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" @@ -120,7 +120,7 @@ func newDefaultNode(config *cfg.Config, logger log.Logger) (service.Service, err func makeNode(config *cfg.Config, privValidator types.PrivValidator, nodeKey types.NodeKey, - clientCreator abcicli.ClientCreator, + clientCreator abciclient.ClientCreator, genesisDocProvider genesisDocProvider, dbProvider cfg.DBProvider, logger log.Logger) (service.Service, error) { diff --git a/node/node_test.go b/node/node_test.go index 31f15c336..5c89b6536 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -16,7 +16,7 @@ import ( dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" @@ -214,7 +214,7 @@ func testFreeAddr(t *testing.T) string { func TestCreateProposalBlock(t *testing.T) { config := cfg.ResetTestRoot("node_create_proposal") defer os.RemoveAll(config.RootDir) - cc := abcicli.NewLocalClientCreator(kvstore.NewApplication()) + cc := abciclient.NewLocalClientCreator(kvstore.NewApplication()) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -306,7 +306,7 @@ func TestCreateProposalBlock(t *testing.T) { func TestMaxTxsProposalBlockSize(t *testing.T) { config := cfg.ResetTestRoot("node_create_proposal") defer os.RemoveAll(config.RootDir) - cc := abcicli.NewLocalClientCreator(kvstore.NewApplication()) + cc := abciclient.NewLocalClientCreator(kvstore.NewApplication()) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -368,7 +368,7 @@ func TestMaxTxsProposalBlockSize(t *testing.T) { func TestMaxProposalBlockSize(t *testing.T) { config := cfg.ResetTestRoot("node_create_proposal") defer os.RemoveAll(config.RootDir) - cc := abcicli.NewLocalClientCreator(kvstore.NewApplication()) + cc := abciclient.NewLocalClientCreator(kvstore.NewApplication()) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) diff --git a/node/public.go b/node/public.go index 20fc10cfc..3ec3fa3b8 100644 --- a/node/public.go +++ b/node/public.go @@ -4,7 +4,7 @@ package node import ( "fmt" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" @@ -28,7 +28,7 @@ func NewDefault(conf *config.Config, logger log.Logger) (service.Service, error) // value of the final argument. func New(conf *config.Config, logger log.Logger, - cf abcicli.ClientCreator, + cf abciclient.ClientCreator, gen *types.GenesisDoc, ) (service.Service, error) { nodeKey, err := types.LoadOrGenNodeKey(conf.NodeKeyFile()) diff --git a/node/setup.go b/node/setup.go index c24c29480..10e85bd5f 100644 --- a/node/setup.go +++ b/node/setup.go @@ -12,7 +12,7 @@ import ( dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" @@ -51,7 +51,7 @@ func initDBs(config *cfg.Config, dbProvider cfg.DBProvider) (blockStore *store.B return } -func createAndStartProxyAppConns(clientCreator abcicli.ClientCreator, logger log.Logger) (proxy.AppConns, error) { +func createAndStartProxyAppConns(clientCreator abciclient.ClientCreator, logger log.Logger) (proxy.AppConns, error) { proxyApp := proxy.NewAppConns(clientCreator) proxyApp.SetLogger(logger.With("module", "proxy")) if err := proxyApp.Start(); err != nil { diff --git a/rpc/test/helpers.go b/rpc/test/helpers.go index a56258655..f3ce82b91 100644 --- a/rpc/test/helpers.go +++ b/rpc/test/helpers.go @@ -6,7 +6,7 @@ import ( "os" "time" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" @@ -100,7 +100,7 @@ func StartTendermint(ctx context.Context, } else { logger = log.MustNewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo, false) } - papp := abcicli.NewLocalClientCreator(app) + papp := abciclient.NewLocalClientCreator(app) node, err := nm.New(conf, logger, papp, nil) if err != nil { return nil, func(_ context.Context) error { return nil }, err diff --git a/state/execution_test.go b/state/execution_test.go index 952ef3308..fca2a79c4 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" @@ -35,7 +35,7 @@ var ( func TestApplyBlock(t *testing.T) { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -60,7 +60,7 @@ func TestApplyBlock(t *testing.T) { // TestBeginBlockValidators ensures we send absent validators list. func TestBeginBlockValidators(t *testing.T) { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -123,7 +123,7 @@ func TestBeginBlockValidators(t *testing.T) { // TestBeginBlockByzantineValidators ensures we send byzantine validators list. func TestBeginBlockByzantineValidators(t *testing.T) { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -348,7 +348,7 @@ func TestUpdateValidators(t *testing.T) { // TestEndBlockValidatorUpdates ensures we update validator set and send an event. func TestEndBlockValidatorUpdates(t *testing.T) { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) @@ -421,7 +421,7 @@ func TestEndBlockValidatorUpdates(t *testing.T) { // would result in empty set causes no panic, an error is raised and NextValidators is not updated func TestEndBlockValidatorUpdatesResultingInEmptySet(t *testing.T) { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(cc) err := proxyApp.Start() require.Nil(t, err) diff --git a/state/helpers_test.go b/state/helpers_test.go index 855ebbf9a..8dd6f4272 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -7,7 +7,7 @@ import ( dbm "github.com/tendermint/tm-db" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" @@ -30,7 +30,7 @@ type paramsChangeTestCase struct { func newTestApp() proxy.AppConns { app := &testApp{} - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) return proxy.NewAppConns(cc) } diff --git a/test/e2e/app/main.go b/test/e2e/app/main.go index 200280f6b..411b69911 100644 --- a/test/e2e/app/main.go +++ b/test/e2e/app/main.go @@ -14,7 +14,7 @@ import ( "github.com/spf13/viper" "google.golang.org/grpc" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" @@ -130,7 +130,7 @@ func startNode(cfg *Config) error { n, err := node.New(tmcfg, nodeLogger, - abcicli.NewLocalClientCreator(app), + abciclient.NewLocalClientCreator(app), nil, ) if err != nil { diff --git a/test/fuzz/mempool/v0/checktx.go b/test/fuzz/mempool/v0/checktx.go index a764a43c2..3095107cf 100644 --- a/test/fuzz/mempool/v0/checktx.go +++ b/test/fuzz/mempool/v0/checktx.go @@ -3,7 +3,7 @@ package v0 import ( "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/mempool" @@ -14,7 +14,7 @@ var mp mempool.Mempool func init() { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) appConnMem, _ := cc.NewABCIClient() err := appConnMem.Start() if err != nil { diff --git a/test/fuzz/mempool/v1/checktx.go b/test/fuzz/mempool/v1/checktx.go index 4e9e35be2..6d3a44e00 100644 --- a/test/fuzz/mempool/v1/checktx.go +++ b/test/fuzz/mempool/v1/checktx.go @@ -3,7 +3,7 @@ package v1 import ( "context" - abcicli "github.com/tendermint/tendermint/abci/client" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/mempool" @@ -14,7 +14,7 @@ var mp mempool.Mempool func init() { app := kvstore.NewApplication() - cc := abcicli.NewLocalClientCreator(app) + cc := abciclient.NewLocalClientCreator(app) appConnMem, _ := cc.NewABCIClient() err := appConnMem.Start() if err != nil {