Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Break import cycle in ethereum package
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Brink committed Oct 16, 2017
1 parent b1be10d commit 61d23fb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ethereum/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"github.com/stretchr/testify/assert"

"github.com/ethereum/go-ethereum/node"

"github.com/tendermint/ethermint/ethereum"
)

var dummyApp = &cli.App{
Expand All @@ -28,7 +26,7 @@ func TestNewNodeConfig(t *testing.T) {
assert.Nil(t, err, "expecting no panics")
}()

ncfg := ethereum.NewNodeConfig(dummyContext)
ncfg := NewNodeConfig(dummyContext)
assert.NotNil(t, ncfg, "expecting a non-nil config")
}

Expand All @@ -38,15 +36,15 @@ func TestNewEthConfig(t *testing.T) {
assert.Nil(t, err, "expecting no panics")
}()

ecfg := ethereum.NewEthConfig(dummyContext, dummyNode)
ecfg := NewEthConfig(dummyContext, dummyNode)
assert.NotNil(t, ecfg, "expecting a non-nil config")
}

func TestEnsureDisabledEthereumP2PStack(t *testing.T) {
cfg := new(node.Config)
*cfg = node.DefaultConfig
cfg.P2P.ListenAddr = ":34555"
node, err := ethereum.New(cfg)
node, err := New(cfg)
if err != nil {
t.Fatalf("cannot initialise new node from config: %v", err)
}
Expand Down

0 comments on commit 61d23fb

Please sign in to comment.