diff --git a/client/asset/eth/nodeclient.go b/client/asset/eth/nodeclient.go index ec9a6a97bd..df3fa76f34 100644 --- a/client/asset/eth/nodeclient.go +++ b/client/asset/eth/nodeclient.go @@ -155,17 +155,6 @@ func (n *nodeClient) block(ctx context.Context, hash common.Hash) (*types.Block, return n.leth.ApiBackend.BlockByHash(ctx, hash) } -// accounts returns all accounts from the internal node. -func (n *nodeClient) accounts() []*accounts.Account { - var accts []*accounts.Account - for _, wallet := range n.node.AccountManager().Wallets() { - for _, acct := range wallet.Accounts() { - accts = append(accts, &acct) - } - } - return accts -} - func (n *nodeClient) stateAt(ctx context.Context, bn rpc.BlockNumber) (*state.StateDB, error) { state, _, err := n.leth.ApiBackend.StateAndHeaderByNumberOrHash(ctx, rpc.BlockNumberOrHashWithNumber(bn)) if err != nil { @@ -312,19 +301,6 @@ func (n *nodeClient) addPeer(peerURL string) error { return nil } -// nodeInfo retrieves useful information about a node. -// Not used in production. TODO: remove? -func (n *nodeClient) nodeInfo() *p2p.NodeInfo { - return n.p2pSrv.NodeInfo() -} - -// listWallets list all of the wallet's wallets? and accounts along with details -// such as locked status. -// Not used in production. TODO: remove? -func (n *nodeClient) listWallets() []accounts.Wallet { - return n.creds.ks.Wallets() -} - // sendTransaction sends a tx. func (n *nodeClient) sendTransaction(ctx context.Context, txOpts *bind.TransactOpts, to common.Address, data []byte) (*types.Transaction, error) { @@ -360,12 +336,6 @@ func (n *nodeClient) syncProgress() ethereum.SyncProgress { return n.leth.ApiBackend.SyncProgress() } -// peers returns connected peers. -// Not used in production. TODO: remove? -func (n *nodeClient) peers() []*p2p.Peer { - return n.p2pSrv.Peers() -} - // swap gets a swap keyed by secretHash in the contract. func (n *nodeClient) swap(ctx context.Context, secretHash [32]byte, contractVer uint32) (swap *dexeth.SwapState, err error) { return swap, n.withcontractor(contractVer, func(c contractor) error { diff --git a/client/asset/eth/nodeclient_harness_test.go b/client/asset/eth/nodeclient_harness_test.go index 056cee79ef..883d006f3f 100644 --- a/client/asset/eth/nodeclient_harness_test.go +++ b/client/asset/eth/nodeclient_harness_test.go @@ -247,7 +247,6 @@ func syncClient(cl *nodeClient) error { func TestBasicRetrieval(t *testing.T) { syncClient(ethClient) - t.Run("testNodeInfo", testNodeInfo) t.Run("testBestBlockHash", testBestBlockHash) t.Run("testBestHeader", testBestHeader) t.Run("testBlock", testBlock) @@ -257,16 +256,13 @@ func TestBasicRetrieval(t *testing.T) { func TestPeering(t *testing.T) { t.Run("testAddPeer", testAddPeer) t.Run("testSyncProgress", testSyncProgress) - t.Run("testPeers", testPeers) t.Run("testGetCodeAt", testGetCodeAt) } func TestAccount(t *testing.T) { - t.Run("testAccounts", testAccounts) t.Run("testBalance", testBalance) t.Run("testUnlock", testUnlock) t.Run("testLock", testLock) - t.Run("testListWallets", testListWallets) t.Run("testSendTransaction", testSendTransaction) t.Run("testTransactionReceipt", testTransactionReceipt) t.Run("testSignMessage", testSignMessage) @@ -284,11 +280,6 @@ func TestContract(t *testing.T) { // t.Run("testRefund", testRefund) } -func testNodeInfo(t *testing.T) { - ni := ethClient.nodeInfo() - spew.Dump(ni) -} - func testAddPeer(t *testing.T) { if err := ethClient.addPeer(alphaNode); err != nil { t.Fatal(err) @@ -323,14 +314,6 @@ func testBlock(t *testing.T) { spew.Dump(b) } -func testAccounts(t *testing.T) { - accts := ethClient.accounts() - if len(accts) == 0 { - t.Errorf("Found no accounts") - } - spew.Dump(accts) -} - func testBalance(t *testing.T) { bal, err := ethClient.balance(ctx) if err != nil { @@ -356,14 +339,6 @@ func testLock(t *testing.T) { } } -func testListWallets(t *testing.T) { - wallets := ethClient.listWallets() - if len(wallets) == 0 { - t.Fatalf("no wallets") - } - spew.Dump(wallets) -} - func testSendTransaction(t *testing.T) { err := ethClient.unlock(pw) if err != nil { @@ -463,11 +438,6 @@ func testSyncProgress(t *testing.T) { spew.Dump(ethClient.syncProgress()) } -func testPeers(t *testing.T) { - peers := ethClient.peers() - spew.Dump(peers) -} - func TestInitiateGas(t *testing.T) { err := ethClient.unlock(pw) if err != nil {