From d1926bcad178bc3ae99ba879b42ca003f126398d Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 21 Apr 2017 18:12:54 -0400 Subject: [PATCH] use tmlibs --- CHANGELOG.md | 2 +- benchmarks/map_test.go | 2 +- benchmarks/os_test.go | 2 +- benchmarks/simu/counter.go | 2 +- blockchain/log.go | 2 +- blockchain/pool.go | 4 ++-- blockchain/pool_test.go | 2 +- blockchain/reactor.go | 2 +- blockchain/store.go | 4 ++-- cmd/tendermint/commands/init.go | 2 +- cmd/tendermint/commands/root.go | 2 +- cmd/tendermint/commands/run_node.go | 2 +- cmd/tendermint/commands/testnet.go | 2 +- config/tendermint/config.go | 2 +- config/tendermint_test/config.go | 4 ++-- consensus/byzantine_test.go | 4 ++-- consensus/common_test.go | 4 ++-- consensus/height_vote_set.go | 2 +- consensus/height_vote_set_test.go | 2 +- consensus/log.go | 2 +- consensus/mempool_test.go | 2 +- consensus/reactor.go | 2 +- consensus/reactor_test.go | 2 +- consensus/replay.go | 4 ++-- consensus/replay_file.go | 4 ++-- consensus/replay_test.go | 4 ++-- consensus/state.go | 2 +- consensus/state_test.go | 2 +- consensus/ticker.go | 2 +- consensus/version.go | 2 +- consensus/wal.go | 4 ++-- docs/architecture/merkle.md | 2 +- glide.lock | 12 ++++++------ glide.yaml | 12 ++++++------ mempool/log.go | 2 +- mempool/mempool.go | 6 +++--- mempool/reactor.go | 2 +- node/log.go | 2 +- node/node.go | 4 ++-- proxy/app_conn_test.go | 2 +- proxy/log.go | 2 +- proxy/multi_app_conn.go | 2 +- rpc/tendermint/client/helpers.go | 4 ++-- rpc/tendermint/client/httpclient.go | 4 ++-- rpc/tendermint/core/blocks.go | 2 +- rpc/tendermint/grpc/client_server.go | 2 +- rpc/tendermint/test/client_test.go | 2 +- rpc/tendermint/test/helpers.go | 2 +- state/errors.go | 2 +- state/execution.go | 2 +- state/execution_test.go | 2 +- state/log.go | 2 +- state/state.go | 4 ++-- state/state_test.go | 2 +- state/txindex/kv/kv.go | 2 +- state/txindex/kv/kv_test.go | 2 +- test/test_libs.sh | 2 +- types/block.go | 2 +- types/events.go | 4 ++-- types/genesis.go | 2 +- types/log.go | 2 +- types/part_set.go | 2 +- types/part_set_test.go | 2 +- types/priv_validator.go | 2 +- types/proposal.go | 2 +- types/signable.go | 2 +- types/tx_test.go | 4 ++-- types/validator.go | 2 +- types/validator_set.go | 2 +- types/validator_set_test.go | 2 +- types/vote.go | 2 +- types/vote_set.go | 2 +- types/vote_set_test.go | 4 ++-- 73 files changed, 101 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1eec2f8..b7b54bda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,7 +144,7 @@ IMPROVEMENTS: - Less verbose logging - Better test coverage (37% -> 49%) - Canonical SignBytes for signable types -- Write-Ahead Log for Mempool and Consensus via go-autofile +- Write-Ahead Log for Mempool and Consensus via tmlibs/autofile - Better in-process testing for the consensus reactor and byzantine faults - Better crash/restart testing for individual nodes at preset failure points, and of networks at arbitrary points - Better abstraction over timeout mechanics diff --git a/benchmarks/map_test.go b/benchmarks/map_test.go index ee538e0f..80edaff7 100644 --- a/benchmarks/map_test.go +++ b/benchmarks/map_test.go @@ -1,7 +1,7 @@ package benchmarks import ( - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "testing" ) diff --git a/benchmarks/os_test.go b/benchmarks/os_test.go index 49a160cd..2c4611c8 100644 --- a/benchmarks/os_test.go +++ b/benchmarks/os_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) func BenchmarkFileWrite(b *testing.B) { diff --git a/benchmarks/simu/counter.go b/benchmarks/simu/counter.go index e5044766..9a6db3f4 100644 --- a/benchmarks/simu/counter.go +++ b/benchmarks/simu/counter.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/gorilla/websocket" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-rpc/client" "github.com/tendermint/go-rpc/types" "github.com/tendermint/go-wire" diff --git a/blockchain/log.go b/blockchain/log.go index 29dc03f6..9ffee729 100644 --- a/blockchain/log.go +++ b/blockchain/log.go @@ -1,7 +1,7 @@ package blockchain import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "blockchain") diff --git a/blockchain/pool.go b/blockchain/pool.go index 0deacd26..6422ef2d 100644 --- a/blockchain/pool.go +++ b/blockchain/pool.go @@ -5,8 +5,8 @@ import ( "sync" "time" - . "github.com/tendermint/go-common" - flow "github.com/tendermint/go-flowrate/flowrate" + . "github.com/tendermint/tmlibs/common" + flow "github.com/tendermint/tmlibs/flowrate" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/pool_test.go b/blockchain/pool_test.go index 220bc5ce..a2eb83a3 100644 --- a/blockchain/pool_test.go +++ b/blockchain/pool_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/reactor.go b/blockchain/reactor.go index f88bccc3..122f03ae 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -6,7 +6,7 @@ import ( "reflect" "time" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" "github.com/tendermint/go-p2p" "github.com/tendermint/go-wire" diff --git a/blockchain/store.go b/blockchain/store.go index ac7cfdaf..a96aa0fb 100644 --- a/blockchain/store.go +++ b/blockchain/store.go @@ -7,8 +7,8 @@ import ( "io" "sync" - . "github.com/tendermint/go-common" - dbm "github.com/tendermint/go-db" + . "github.com/tendermint/tmlibs/common" + dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/types" ) diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index 366ca4e8..75bc2bf9 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/types" ) diff --git a/cmd/tendermint/commands/root.go b/cmd/tendermint/commands/root.go index 0cbaa289..120d53c0 100644 --- a/cmd/tendermint/commands/root.go +++ b/cmd/tendermint/commands/root.go @@ -3,7 +3,7 @@ package commands import ( "github.com/spf13/cobra" - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" tmcfg "github.com/tendermint/tendermint/config/tendermint" ) diff --git a/cmd/tendermint/commands/run_node.go b/cmd/tendermint/commands/run_node.go index a04b52d0..5e0fef32 100644 --- a/cmd/tendermint/commands/run_node.go +++ b/cmd/tendermint/commands/run_node.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/node" "github.com/tendermint/tendermint/types" ) diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 0a2e00ad..58767eb0 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/types" ) diff --git a/config/tendermint/config.go b/config/tendermint/config.go index 5ddde460..93650eae 100644 --- a/config/tendermint/config.go +++ b/config/tendermint/config.go @@ -5,7 +5,7 @@ import ( "path" "strings" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" ) diff --git a/config/tendermint_test/config.go b/config/tendermint_test/config.go index 78c3bb33..fcdc572b 100644 --- a/config/tendermint_test/config.go +++ b/config/tendermint_test/config.go @@ -7,9 +7,9 @@ import ( "path" "strings" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) func init() { diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index cd62f3f0..fabf4e3c 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -7,9 +7,9 @@ import ( "github.com/tendermint/tendermint/config/tendermint_test" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" - "github.com/tendermint/go-events" + "github.com/tendermint/tmlibs/events" "github.com/tendermint/go-p2p" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/common_test.go b/consensus/common_test.go index 334c66dc..6effddb2 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -13,9 +13,9 @@ import ( abcicli "github.com/tendermint/abci/client" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/go-p2p" bc "github.com/tendermint/tendermint/blockchain" "github.com/tendermint/tendermint/config/tendermint_test" diff --git a/consensus/height_vote_set.go b/consensus/height_vote_set.go index e7f4be3b..b2aebb09 100644 --- a/consensus/height_vote_set.go +++ b/consensus/height_vote_set.go @@ -4,7 +4,7 @@ import ( "strings" "sync" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/height_vote_set_test.go b/consensus/height_vote_set_test.go index 3bede25c..a86cba4f 100644 --- a/consensus/height_vote_set_test.go +++ b/consensus/height_vote_set_test.go @@ -3,7 +3,7 @@ package consensus import ( "testing" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/log.go b/consensus/log.go index edf7a0a8..3e46c5ee 100644 --- a/consensus/log.go +++ b/consensus/log.go @@ -1,7 +1,7 @@ package consensus import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "consensus") diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 6bfdfda9..8808185d 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -9,7 +9,7 @@ import ( "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) func init() { diff --git a/consensus/reactor.go b/consensus/reactor.go index c3b1c590..cd0c069f 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -8,7 +8,7 @@ import ( "sync" "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-p2p" "github.com/tendermint/go-wire" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index bc26ffc0..1ebbf8a5 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -8,7 +8,7 @@ import ( "github.com/tendermint/tendermint/config/tendermint_test" - "github.com/tendermint/go-events" + "github.com/tendermint/tmlibs/events" "github.com/tendermint/go-p2p" "github.com/tendermint/tendermint/types" "github.com/tendermint/abci/example/dummy" diff --git a/consensus/replay.go b/consensus/replay.go index bd0975f4..931e8893 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -11,8 +11,8 @@ import ( "time" abci "github.com/tendermint/abci/types" - auto "github.com/tendermint/go-autofile" - . "github.com/tendermint/go-common" + auto "github.com/tendermint/tmlibs/autofile" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" "github.com/tendermint/go-wire" diff --git a/consensus/replay_file.go b/consensus/replay_file.go index 5ad1b945..3de0e3d1 100644 --- a/consensus/replay_file.go +++ b/consensus/replay_file.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" bc "github.com/tendermint/tendermint/blockchain" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 9368df99..32415d6e 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -15,10 +15,10 @@ import ( "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/abci/example/dummy" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" "github.com/tendermint/go-crypto" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/state.go b/consensus/state.go index 6ff97ddc..8077dcec 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -11,7 +11,7 @@ import ( "github.com/ebuchman/fail-test" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/proxy" diff --git a/consensus/state_test.go b/consensus/state_test.go index b7d9a42d..d2d34e3a 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/ticker.go b/consensus/ticker.go index b318597d..f8031e57 100644 --- a/consensus/ticker.go +++ b/consensus/ticker.go @@ -3,7 +3,7 @@ package consensus import ( "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) var ( diff --git a/consensus/version.go b/consensus/version.go index 34886db3..84f1ec81 100644 --- a/consensus/version.go +++ b/consensus/version.go @@ -1,7 +1,7 @@ package consensus import ( - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) // kind of arbitrary diff --git a/consensus/wal.go b/consensus/wal.go index a89eff5e..e855694a 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -3,8 +3,8 @@ package consensus import ( "time" - auto "github.com/tendermint/go-autofile" - . "github.com/tendermint/go-common" + auto "github.com/tendermint/tmlibs/autofile" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/types" ) diff --git a/docs/architecture/merkle.md b/docs/architecture/merkle.md index 72998db8..4e769aed 100644 --- a/docs/architecture/merkle.md +++ b/docs/architecture/merkle.md @@ -2,7 +2,7 @@ To allow the efficient creation of an ABCi app, tendermint wishes to provide a reference implemention of a key-value store that provides merkle proofs of the data. These proofs then quickly allow the ABCi app to provide an apphash to the consensus engine, as well as a full proof to any client. -This engine is currently implemented in `go-merkle` with `merkleeyes` providing a language-agnostic binding via ABCi. It uses `go-db` bindings internally to persist data to leveldb. +This engine is currently implemented in `go-merkle` with `merkleeyes` providing a language-agnostic binding via ABCi. It uses `tmlibs/db` bindings internally to persist data to leveldb. What are some of the requirements of this store: diff --git a/glide.lock b/glide.lock index 9e59179b..de647021 100644 --- a/glide.lock +++ b/glide.lock @@ -78,11 +78,11 @@ imports: subpackages: - edwards25519 - extra25519 -- name: github.com/tendermint/go-autofile +- name: github.com/tendermint/tmlibs/autofile version: 48b17de82914e1ec2f134ce823ba426337d2c518 -- name: github.com/tendermint/go-clist +- name: github.com/tendermint/tmlibs/clist version: 3baa390bbaf7634251c42ad69a8682e7e3990552 -- name: github.com/tendermint/go-common +- name: github.com/tendermint/tmlibs/common version: f9e3db037330c8a8d61d3966de8473eaf01154fa subpackages: - test @@ -92,15 +92,15 @@ imports: version: 9b95da8fa4187f6799558d89b271dc8ab6485615 - name: github.com/tendermint/go-data version: e7fcc6d081ec8518912fcdc103188275f83a3ee5 -- name: github.com/tendermint/go-db +- name: github.com/tendermint/tmlibs/db version: 9643f60bc2578693844aacf380a7c32e4c029fee -- name: github.com/tendermint/go-events +- name: github.com/tendermint/tmlibs/events version: f8ffbfb2be3483e9e7927495590a727f51c0c11f - name: github.com/tendermint/go-flowrate version: a20c98e61957faa93b4014fbd902f20ab9317a6a subpackages: - flowrate -- name: github.com/tendermint/go-logger +- name: github.com/tendermint/tmlibs/logger version: cefb3a45c0bf3c493a04e9bcd9b1540528be59f2 - name: github.com/tendermint/go-merkle version: 714d4d04557fd068a7c2a1748241ce8428015a96 diff --git a/glide.yaml b/glide.yaml index 03f32872..6225dff2 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,10 +1,10 @@ package: github.com/tendermint/tendermint import: -- package: github.com/tendermint/go-autofile +- package: github.com/tendermint/tmlibs/autofile version: develop -- package: github.com/tendermint/go-clist +- package: github.com/tendermint/tmlibs/clist version: develop -- package: github.com/tendermint/go-common +- package: github.com/tendermint/tmlibs/common version: develop - package: github.com/tendermint/go-config version: develop @@ -12,11 +12,11 @@ import: version: develop - package: github.com/tendermint/go-data version: develop -- package: github.com/tendermint/go-db +- package: github.com/tendermint/tmlibs/db version: develop -- package: github.com/tendermint/go-events +- package: github.com/tendermint/tmlibs/events version: develop -- package: github.com/tendermint/go-logger +- package: github.com/tendermint/tmlibs/logger version: develop - package: github.com/tendermint/go-merkle version: develop diff --git a/mempool/log.go b/mempool/log.go index 90eb8703..ac9596d5 100644 --- a/mempool/log.go +++ b/mempool/log.go @@ -1,7 +1,7 @@ package mempool import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "mempool") diff --git a/mempool/mempool.go b/mempool/mempool.go index e960f520..eedf6fb9 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -8,9 +8,9 @@ import ( "time" abci "github.com/tendermint/abci/types" - auto "github.com/tendermint/go-autofile" - "github.com/tendermint/go-clist" - . "github.com/tendermint/go-common" + auto "github.com/tendermint/tmlibs/autofile" + "github.com/tendermint/tmlibs/clist" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/mempool/reactor.go b/mempool/reactor.go index 4531edee..4b30dd4c 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -7,7 +7,7 @@ import ( "time" abci "github.com/tendermint/abci/types" - "github.com/tendermint/go-clist" + "github.com/tendermint/tmlibs/clist" cfg "github.com/tendermint/go-config" "github.com/tendermint/go-p2p" "github.com/tendermint/go-wire" diff --git a/node/log.go b/node/log.go index 36b45149..946d963c 100644 --- a/node/log.go +++ b/node/log.go @@ -1,7 +1,7 @@ package node import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "node") diff --git a/node/node.go b/node/node.go index 84841d5d..e63e0db3 100644 --- a/node/node.go +++ b/node/node.go @@ -8,10 +8,10 @@ import ( "strings" abci "github.com/tendermint/abci/types" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" crypto "github.com/tendermint/go-crypto" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" p2p "github.com/tendermint/go-p2p" rpc "github.com/tendermint/go-rpc" rpcserver "github.com/tendermint/go-rpc/server" diff --git a/proxy/app_conn_test.go b/proxy/app_conn_test.go index 2054175e..7c072625 100644 --- a/proxy/app_conn_test.go +++ b/proxy/app_conn_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" abcicli "github.com/tendermint/abci/client" "github.com/tendermint/abci/example/dummy" "github.com/tendermint/abci/server" diff --git a/proxy/log.go b/proxy/log.go index 45d31b87..d1d241bf 100644 --- a/proxy/log.go +++ b/proxy/log.go @@ -1,7 +1,7 @@ package proxy import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "proxy") diff --git a/proxy/multi_app_conn.go b/proxy/multi_app_conn.go index 81e01aa2..b70a0baf 100644 --- a/proxy/multi_app_conn.go +++ b/proxy/multi_app_conn.go @@ -1,7 +1,7 @@ package proxy import ( - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" ) diff --git a/rpc/tendermint/client/helpers.go b/rpc/tendermint/client/helpers.go index bd00c143..330bcd19 100644 --- a/rpc/tendermint/client/helpers.go +++ b/rpc/tendermint/client/helpers.go @@ -4,8 +4,8 @@ import ( "time" "github.com/pkg/errors" - cmn "github.com/tendermint/go-common" - events "github.com/tendermint/go-events" + cmn "github.com/tendermint/tmlibs/common" + events "github.com/tendermint/tmlibs/events" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/tendermint/client/httpclient.go b/rpc/tendermint/client/httpclient.go index cfcd9299..494f4413 100644 --- a/rpc/tendermint/client/httpclient.go +++ b/rpc/tendermint/client/httpclient.go @@ -5,7 +5,7 @@ import ( "github.com/pkg/errors" data "github.com/tendermint/go-data" - events "github.com/tendermint/go-events" + events "github.com/tendermint/tmlibs/events" "github.com/tendermint/go-rpc/client" wire "github.com/tendermint/go-wire" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" @@ -198,7 +198,7 @@ type WSEvents struct { // used to maintain counts of actively listened events // so we can properly subscribe/unsubscribe // FIXME: thread-safety??? - // FIXME: reuse code from go-events??? + // FIXME: reuse code from tmlibs/events??? evtCount map[string]int // count how many time each event is subscribed listeners map[string][]string // keep track of which events each listener is listening to } diff --git a/rpc/tendermint/core/blocks.go b/rpc/tendermint/core/blocks.go index 39e18586..aa102255 100644 --- a/rpc/tendermint/core/blocks.go +++ b/rpc/tendermint/core/blocks.go @@ -2,7 +2,7 @@ package core import ( "fmt" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/tendermint/grpc/client_server.go b/rpc/tendermint/grpc/client_server.go index d760bf25..e6055ede 100644 --- a/rpc/tendermint/grpc/client_server.go +++ b/rpc/tendermint/grpc/client_server.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) // Start the grpcServer in a go routine diff --git a/rpc/tendermint/test/client_test.go b/rpc/tendermint/test/client_test.go index 390d652e..9c1bbd8d 100644 --- a/rpc/tendermint/test/client_test.go +++ b/rpc/tendermint/test/client_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" rpc "github.com/tendermint/go-rpc/client" "github.com/tendermint/tendermint/rpc/tendermint/core" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" diff --git a/rpc/tendermint/test/helpers.go b/rpc/tendermint/test/helpers.go index dbbcebbf..6f7050f8 100644 --- a/rpc/tendermint/test/helpers.go +++ b/rpc/tendermint/test/helpers.go @@ -10,7 +10,7 @@ import ( "time" "github.com/stretchr/testify/require" - logger "github.com/tendermint/go-logger" + logger "github.com/tendermint/tmlibs/logger" wire "github.com/tendermint/go-wire" abci "github.com/tendermint/abci/types" diff --git a/state/errors.go b/state/errors.go index 32a9351c..1ea7ed3d 100644 --- a/state/errors.go +++ b/state/errors.go @@ -1,7 +1,7 @@ package state import ( - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) type ( diff --git a/state/execution.go b/state/execution.go index 0b1aff69..643dd4d0 100644 --- a/state/execution.go +++ b/state/execution.go @@ -6,7 +6,7 @@ import ( fail "github.com/ebuchman/fail-test" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" crypto "github.com/tendermint/go-crypto" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/state/txindex" diff --git a/state/execution_test.go b/state/execution_test.go index 299c6baa..40e4044a 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/abci/example/dummy" crypto "github.com/tendermint/go-crypto" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" cfg "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" diff --git a/state/log.go b/state/log.go index 5b102b57..0a235132 100644 --- a/state/log.go +++ b/state/log.go @@ -1,7 +1,7 @@ package state import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "state") diff --git a/state/state.go b/state/state.go index 086b0e71..ccdf508a 100644 --- a/state/state.go +++ b/state/state.go @@ -7,9 +7,9 @@ import ( "time" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" cfg "github.com/tendermint/go-config" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/state/txindex/null" diff --git a/state/state_test.go b/state/state_test.go index dca83e80..f80c08fe 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" abci "github.com/tendermint/abci/types" "github.com/tendermint/go-crypto" - dbm "github.com/tendermint/go-db" + dbm "github.com/tendermint/tmlibs/db" "github.com/tendermint/tendermint/config/tendermint_test" ) diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index 03acc8da..8f684c4a 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - db "github.com/tendermint/go-db" + db "github.com/tendermint/tmlibs/db" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/types" diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index 9a1898d7..8de9b8cd 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/abci/types" - db "github.com/tendermint/go-db" + db "github.com/tendermint/tmlibs/db" "github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/types" ) diff --git a/test/test_libs.sh b/test/test_libs.sh index d08a4659..bf1b0096 100644 --- a/test/test_libs.sh +++ b/test/test_libs.sh @@ -14,7 +14,7 @@ fi # some libs are tested with go, others with make # TODO: should be all make (post repo merge) -LIBS_GO_TEST=(go-clist go-common go-config go-crypto go-db go-events go-merkle go-p2p) +LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle go-p2p) LIBS_MAKE_TEST=(go-rpc go-wire abci) for lib in "${LIBS_GO_TEST[@]}"; do diff --git a/types/block.go b/types/block.go index 61d25f6e..d4cf5a9c 100644 --- a/types/block.go +++ b/types/block.go @@ -8,7 +8,7 @@ import ( "strings" "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-merkle" "github.com/tendermint/go-wire" ) diff --git a/types/events.go b/types/events.go index 11497904..17f6fc6e 100644 --- a/types/events.go +++ b/types/events.go @@ -3,8 +3,8 @@ package types import ( // for registering TMEventData as events.EventData abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" - "github.com/tendermint/go-events" + . "github.com/tendermint/tmlibs/common" + "github.com/tendermint/tmlibs/events" "github.com/tendermint/go-wire" ) diff --git a/types/genesis.go b/types/genesis.go index 2e1ebb64..6a500664 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" ) diff --git a/types/log.go b/types/log.go index dbe8a678..5a4b363b 100644 --- a/types/log.go +++ b/types/log.go @@ -1,7 +1,7 @@ package types import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "types") diff --git a/types/part_set.go b/types/part_set.go index 3a5ee26a..2377b293 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -9,7 +9,7 @@ import ( "golang.org/x/crypto/ripemd160" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-merkle" "github.com/tendermint/go-wire" ) diff --git a/types/part_set_test.go b/types/part_set_test.go index 6e25752d..7088ef31 100644 --- a/types/part_set_test.go +++ b/types/part_set_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) const ( diff --git a/types/priv_validator.go b/types/priv_validator.go index 6798f64b..46d64acb 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -9,7 +9,7 @@ import ( "os" "sync" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" data "github.com/tendermint/go-data" ) diff --git a/types/proposal.go b/types/proposal.go index 9852011f..8406403c 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - //. "github.com/tendermint/go-common" + //. "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" "github.com/tendermint/go-wire" ) diff --git a/types/signable.go b/types/signable.go index df94e43b..c843eeed 100644 --- a/types/signable.go +++ b/types/signable.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-merkle" ) diff --git a/types/tx_test.go b/types/tx_test.go index 7688a9bf..866357e3 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - cmn "github.com/tendermint/go-common" - ctest "github.com/tendermint/go-common/test" + cmn "github.com/tendermint/tmlibs/common" + ctest "github.com/tendermint/tmlibs/common/test" wire "github.com/tendermint/go-wire" ) diff --git a/types/validator.go b/types/validator.go index c4ecef56..2a8795bf 100644 --- a/types/validator.go +++ b/types/validator.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" "github.com/tendermint/go-wire" ) diff --git a/types/validator_set.go b/types/validator_set.go index b997b471..1daf2ef6 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-merkle" "github.com/tendermint/go-wire" ) diff --git a/types/validator_set_test.go b/types/validator_set_test.go index 6cd048cc..71a1993e 100644 --- a/types/validator_set_test.go +++ b/types/validator_set_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" ) diff --git a/types/vote.go b/types/vote.go index af4f60fc..2ad9df0a 100644 --- a/types/vote.go +++ b/types/vote.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" "github.com/tendermint/go-wire" ) diff --git a/types/vote_set.go b/types/vote_set.go index de853a5e..938dbcb6 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) /* diff --git a/types/vote_set_test.go b/types/vote_set_test.go index 500daadf..672b21a0 100644 --- a/types/vote_set_test.go +++ b/types/vote_set_test.go @@ -3,8 +3,8 @@ package types import ( "bytes" - . "github.com/tendermint/go-common" - . "github.com/tendermint/go-common/test" + . "github.com/tendermint/tmlibs/common" + . "github.com/tendermint/tmlibs/common/test" "github.com/tendermint/go-crypto" "testing"