Update for test.

This commit is contained in:
Jim McDonald
2021-10-26 18:02:51 +01:00
parent a3ad4181d3
commit 2f1c89d0a6

View File

@@ -1,4 +1,4 @@
// Copyright © 2020 Weald Technology Trading
// Copyright © 2020, 2021 Weald Technology Trading
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -23,38 +23,6 @@ import (
"github.com/wealdtech/ethdo/util"
)
// A mock Ethereum 2 client service that returns supplied deposit information.
type depositETH2Client struct {
address []byte
chainID uint64
networkID uint64
}
// Name returns the name of the client implementation.
func (c *depositETH2Client) Name() string {
return "deposit mock"
}
// Address returns the address of the client.
func (c *depositETH2Client) Address() string {
return "mock"
}
// DepositContractAddress provides the Ethereum 1 address of the deposit contract.
func (c *depositETH2Client) DepositContractAddress(ctx context.Context) ([]byte, error) {
return c.address, nil
}
// DepositContractChainID provides the Ethereum 1 chain ID of the deposit contract.
func (c *depositETH2Client) DepositContractChainID(ctx context.Context) (uint64, error) {
return c.chainID, nil
}
// DepositContractNetworkID provides the Ethereum 1 network ID of the deposit contract.
func (c *depositETH2Client) DepositContractNetworkID(ctx context.Context) (uint64, error) {
return c.networkID, nil
}
// A mock Ethereum 2 client service that returns spec information.
type specETH2Client struct {
address []byte
@@ -88,15 +56,6 @@ func TestNetworks(t *testing.T) {
name: "Nil",
err: "no Ethereum 2 client supplied",
},
{
name: "MainnetDeposit",
service: &depositETH2Client{
address: testutil.HexToBytes("0x00000000219ab540356cbb839cbe05303d7705fa"),
chainID: 0,
networkID: 0,
},
network: "Mainnet",
},
{
name: "MainnetSpec",
service: &specETH2Client{
@@ -104,15 +63,6 @@ func TestNetworks(t *testing.T) {
},
network: "Mainnet",
},
{
name: "UnknownDeposit",
service: &depositETH2Client{
address: testutil.HexToBytes("0x1111111111111111111111111111111111111111"),
chainID: 0,
networkID: 0,
},
network: "Unknown",
},
{
name: "UnknownSpec",
service: &specETH2Client{