Skip to content

Commit 2f1c89d

Browse files
committed
Update for test.
1 parent a3ad418 commit 2f1c89d

File tree

1 file changed

+1
-51
lines changed

1 file changed

+1
-51
lines changed

util/networks_test.go

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © 2020 Weald Technology Trading
1+
// Copyright © 2020, 2021 Weald Technology Trading
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at
@@ -23,38 +23,6 @@ import (
2323
"github.com/wealdtech/ethdo/util"
2424
)
2525

26-
// A mock Ethereum 2 client service that returns supplied deposit information.
27-
type depositETH2Client struct {
28-
address []byte
29-
chainID uint64
30-
networkID uint64
31-
}
32-
33-
// Name returns the name of the client implementation.
34-
func (c *depositETH2Client) Name() string {
35-
return "deposit mock"
36-
}
37-
38-
// Address returns the address of the client.
39-
func (c *depositETH2Client) Address() string {
40-
return "mock"
41-
}
42-
43-
// DepositContractAddress provides the Ethereum 1 address of the deposit contract.
44-
func (c *depositETH2Client) DepositContractAddress(ctx context.Context) ([]byte, error) {
45-
return c.address, nil
46-
}
47-
48-
// DepositContractChainID provides the Ethereum 1 chain ID of the deposit contract.
49-
func (c *depositETH2Client) DepositContractChainID(ctx context.Context) (uint64, error) {
50-
return c.chainID, nil
51-
}
52-
53-
// DepositContractNetworkID provides the Ethereum 1 network ID of the deposit contract.
54-
func (c *depositETH2Client) DepositContractNetworkID(ctx context.Context) (uint64, error) {
55-
return c.networkID, nil
56-
}
57-
5826
// A mock Ethereum 2 client service that returns spec information.
5927
type specETH2Client struct {
6028
address []byte
@@ -88,31 +56,13 @@ func TestNetworks(t *testing.T) {
8856
name: "Nil",
8957
err: "no Ethereum 2 client supplied",
9058
},
91-
{
92-
name: "MainnetDeposit",
93-
service: &depositETH2Client{
94-
address: testutil.HexToBytes("0x00000000219ab540356cbb839cbe05303d7705fa"),
95-
chainID: 0,
96-
networkID: 0,
97-
},
98-
network: "Mainnet",
99-
},
10059
{
10160
name: "MainnetSpec",
10261
service: &specETH2Client{
10362
address: testutil.HexToBytes("0x00000000219ab540356cbb839cbe05303d7705fa"),
10463
},
10564
network: "Mainnet",
10665
},
107-
{
108-
name: "UnknownDeposit",
109-
service: &depositETH2Client{
110-
address: testutil.HexToBytes("0x1111111111111111111111111111111111111111"),
111-
chainID: 0,
112-
networkID: 0,
113-
},
114-
network: "Unknown",
115-
},
11666
{
11767
name: "UnknownSpec",
11868
service: &specETH2Client{

0 commit comments

Comments
 (0)