Skip to content

Commit b2a7e6e

Browse files
committed
chore: remove tendermint
1 parent b7aacc1 commit b2a7e6e

File tree

4 files changed

+27
-20
lines changed

4 files changed

+27
-20
lines changed

go.mod

+9-11
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,23 @@ module github.com/axelarnetwork/utils
33
go 1.18
44

55
require (
6+
github.com/cometbft/cometbft v0.37.5
67
github.com/go-errors/errors v1.4.2
78
github.com/matryer/moq v0.3.2
89
github.com/pkg/errors v0.9.1
9-
github.com/stretchr/testify v1.8.1
10-
github.com/tendermint/tendermint v0.34.2
11-
golang.org/x/exp v0.0.0-20221018221608-02f3b879a704
12-
golang.org/x/sync v0.3.0
10+
github.com/stretchr/testify v1.8.4
11+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
12+
golang.org/x/sync v0.5.0
1313
)
1414

1515
require (
16-
github.com/davecgh/go-spew v1.1.1 // indirect
16+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1717
github.com/go-kit/log v0.2.1 // indirect
1818
github.com/go-logfmt/logfmt v0.5.1 // indirect
19-
github.com/pmezard/go-difflib v1.0.0 // indirect
20-
golang.org/x/mod v0.11.0 // indirect
21-
golang.org/x/sys v0.9.0 // indirect
22-
golang.org/x/tools v0.10.0 // indirect
19+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
20+
golang.org/x/mod v0.12.0 // indirect
21+
golang.org/x/sys v0.15.0 // indirect
22+
golang.org/x/tools v0.13.0 // indirect
2323
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2424
gopkg.in/yaml.v3 v3.0.1 // indirect
2525
)
26-
27-
replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27

go.sum

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 h1:E7LT642ysztPWE0
4040
github.com/cloudflare/circl v1.3.1 h1:4OVCZRL62ijwEwxnF6I7hLwxvIYi3VaZt8TflkqtrtA=
4141
github.com/cometbft/cometbft v0.34.27 h1:ri6BvmwjWR0gurYjywcBqRe4bbwc3QVs9KRcCzgh/J0=
4242
github.com/cometbft/cometbft v0.34.27/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
43+
github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY=
4344
github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo=
4445
github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs=
4546
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
@@ -52,6 +53,7 @@ github.com/daixiang0/gci v0.8.1 h1:T4xpSC+hmsi4CSyuYfIJdMZAr9o7xZmHpQVygMghGZ4=
5253
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5354
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
5455
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
56+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5557
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
5658
github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU=
5759
github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o=
@@ -203,6 +205,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
203205
github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
204206
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
205207
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
208+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
206209
github.com/polyfloyd/go-errorlint v1.0.5 h1:AHB5JRCjlmelh9RrLxT9sgzpalIwwq4hqE8EkwIwKdY=
207210
github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw=
208211
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
@@ -250,6 +253,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
250253
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
251254
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
252255
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
256+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
253257
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
254258
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
255259
github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A=
@@ -280,18 +284,23 @@ go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
280284
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
281285
golang.org/x/exp v0.0.0-20221018221608-02f3b879a704 h1:qeTd8Mtg7Z9G839eB0/DhF2vU3ZeXcP6vwAY/IqVRPM=
282286
golang.org/x/exp v0.0.0-20221018221608-02f3b879a704/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
287+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
283288
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk=
284289
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
285290
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
291+
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
286292
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
287293
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
288294
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
295+
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
289296
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
290297
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
298+
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
291299
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
292300
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
293301
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
294302
golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
303+
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
295304
gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM=
296305
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c=
297306
google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk=

log/log.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package log
33
import (
44
"context"
55
"fmt"
6-
tmlog "github.com/tendermint/tendermint/libs/log"
6+
cmlog "github.com/cometbft/cometbft/libs/log"
77
)
88

99
// Logger is a simple interface to log at three log levels with additional formatting methods for convenience
@@ -17,13 +17,13 @@ type Logger interface {
1717
}
1818

1919
var (
20-
defaultLogger = logWrapper{tmlog.NewNopLogger()}
20+
defaultLogger = logWrapper{cmlog.NewNopLogger()}
2121
frozen bool
2222
)
2323

2424
// Setup sets the logger that the application should use. The default is a nop logger, i.e. all logs are discarded.
2525
// Panics if called more than once without calling Reset first.
26-
func Setup(logger tmlog.Logger) {
26+
func Setup(logger cmlog.Logger) {
2727
if frozen {
2828
panic("logger was already set")
2929
}
@@ -34,7 +34,7 @@ func Setup(logger tmlog.Logger) {
3434

3535
// Reset returns the logger state to the default nop logger and enables Setup to be called again.
3636
func Reset() {
37-
defaultLogger = logWrapper{tmlog.NewNopLogger()}
37+
defaultLogger = logWrapper{cmlog.NewNopLogger()}
3838
frozen = false
3939
}
4040

@@ -130,7 +130,7 @@ func WithKeyVals(keyvals ...any) Logger {
130130
}
131131

132132
type logWrapper struct {
133-
tmlog.Logger
133+
cmlog.Logger
134134
}
135135

136136
func (l logWrapper) Debug(msg string) {

log/log_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package log_test
33
import (
44
"context"
55
"github.com/axelarnetwork/utils/log"
6+
cmlog "github.com/cometbft/cometbft/libs/log"
67
"github.com/stretchr/testify/assert"
7-
tmlog "github.com/tendermint/tendermint/libs/log"
88
"testing"
99
)
1010

@@ -20,8 +20,8 @@ func TestMultipleSetups(t *testing.T) {
2020
t.Cleanup(log.Reset)
2121

2222
assert.Panics(t, func() {
23-
log.Setup(tmlog.NewNopLogger())
24-
log.Setup(tmlog.NewNopLogger())
23+
log.Setup(cmlog.NewNopLogger())
24+
log.Setup(cmlog.NewNopLogger())
2525
})
2626
}
2727

@@ -271,7 +271,7 @@ func (t *testLogger) Error(msg string, keyvals ...interface{}) {
271271
t.Keyvals <- append(t.keyvals, keyvals...)
272272
}
273273

274-
func (t *testLogger) With(keyvals ...interface{}) tmlog.Logger {
274+
func (t *testLogger) With(keyvals ...interface{}) cmlog.Logger {
275275
return &testLogger{
276276
Output: t.Output,
277277
Keyvals: t.Keyvals,

0 commit comments

Comments
 (0)