Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Dec 6, 2024
1 parent 9032046 commit 2b7b27e
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 50 deletions.
2 changes: 1 addition & 1 deletion api/accounts/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/vechain/thor/v2/api/accounts"
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tx"
Expand Down
2 changes: 1 addition & 1 deletion api/blocks/blocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/vechain/thor/v2/api/blocks"
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tx"
Expand Down
4 changes: 2 additions & 2 deletions api/debug/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/builtin"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/muxdb"
"github.com/vechain/thor/v2/state"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tracers/logger"
Expand Down
2 changes: 1 addition & 1 deletion api/events/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/api/events"
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/logdb"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tx"
Expand Down
2 changes: 1 addition & 1 deletion api/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/api/accounts"
"github.com/vechain/thor/v2/api/subscriptions"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/metrics"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/txpool"
)
Expand Down
2 changes: 1 addition & 1 deletion api/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/api/node"
"github.com/vechain/thor/v2/comm"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/txpool"
)
Expand Down
4 changes: 2 additions & 2 deletions api/subscriptions/block_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/test/eventcontract"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/eventcontract"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/tx"
)
Expand Down
4 changes: 2 additions & 2 deletions api/subscriptions/subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/test/eventcontract"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/eventcontract"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/tx"
"github.com/vechain/thor/v2/txpool"
Expand Down
4 changes: 2 additions & 2 deletions api/transactions/transactions_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
"github.com/vechain/thor/v2/chain"
"github.com/vechain/thor/v2/cmd/thor/solo"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/logdb"
"github.com/vechain/thor/v2/muxdb"
"github.com/vechain/thor/v2/packer"
"github.com/vechain/thor/v2/state"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/tx"
"github.com/vechain/thor/v2/txpool"
Expand Down
2 changes: 1 addition & 1 deletion api/transactions/transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/api/transactions"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tx"
Expand Down
4 changes: 2 additions & 2 deletions api/transfers/transfers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"github.com/vechain/thor/v2/api/events"
"github.com/vechain/thor/v2/api/transfers"
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/logdb"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thorclient"
"github.com/vechain/thor/v2/tx"
)
Expand Down
2 changes: 1 addition & 1 deletion api/utils/revisions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/thor"
)

Expand Down
2 changes: 1 addition & 1 deletion bft/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/vechain/thor/v2/block"
"github.com/vechain/thor/v2/chain"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/muxdb"
"github.com/vechain/thor/v2/packer"
"github.com/vechain/thor/v2/state"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/thor"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/thor/node/node_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
"github.com/vechain/thor/v2/chain"
"github.com/vechain/thor/v2/cmd/thor/solo"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/logdb"
"github.com/vechain/thor/v2/muxdb"
"github.com/vechain/thor/v2/packer"
"github.com/vechain/thor/v2/state"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/tx"
)
Expand Down
5 changes: 2 additions & 3 deletions cmd/thor/p2p/p2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ import (
"testing"

"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/vechain/thor/v2/p2psrv"
"github.com/vechain/thor/v2/test/datagen"

"github.com/stretchr/testify/assert"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/p2psrv"
)

func TestNewThorP2P(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions thorclient/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"github.com/vechain/thor/v2/api/node"
"github.com/vechain/thor/v2/comm"
"github.com/vechain/thor/v2/genesis"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/internal/testchain"
"github.com/vechain/thor/v2/logdb"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/test/testchain"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/tx"
"github.com/vechain/thor/v2/txpool"
Expand Down
26 changes: 1 addition & 25 deletions thorclient/wsclient/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/vechain/thor/v2/api/subscriptions"
"github.com/vechain/thor/v2/test/datagen"
"github.com/vechain/thor/v2/internal/datagen"
"github.com/vechain/thor/v2/thor"
"github.com/vechain/thor/v2/thorclient/common"
)
Expand Down Expand Up @@ -445,27 +445,3 @@ func TestSubscribeBeats2WithServer(t *testing.T) {
t.Log(ev.Data)
}
}

func TestSubscriptThorSolo(t *testing.T) {
t.Skip("manual test")
client, err := NewClient("http://localhost:8669")
if err != nil {
t.Fatal(err)
}

sub, err := client.SubscribeBlocks("")
if err != nil {
t.Fatal(err)
}

for {
select {
case ev := <-sub.EventChan:
if ev.Error != nil {
t.Fatal(ev.Error)
return
}
t.Log(ev.Data.Obsolete)
}
}
}

0 comments on commit 2b7b27e

Please sign in to comment.