Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Litvinov <[email protected]>
  • Loading branch information
Zensey committed Apr 30, 2024
1 parent be5e15b commit 483c458
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion services/wireguard/connection/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ func (mce *mockConnectionEndpoint) ConfigureRoutes(_ net.IP) error { retur
func (mce *mockConnectionEndpoint) PeerStats() (wgcfg.Stats, error) {
return wgcfg.Stats{LastHandshake: time.Now(), BytesSent: 10, BytesReceived: 11}, nil
}
func (mce *mockConnectionEndpoint) ReleaseIP(ip net.IPNet) {}

type mockHandshakeWaiter struct {
err error
Expand Down
3 changes: 0 additions & 3 deletions services/wireguard/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package wireguard

import (
"net"

"github.com/mysteriumnetwork/node/services/wireguard/wgcfg"
)

Expand All @@ -36,5 +34,4 @@ type ConnectionEndpoint interface {
Config() (ServiceConfig, error)
InterfaceName() string
Stop() error
ReleaseIP(ip net.IPNet)
}
5 changes: 0 additions & 5 deletions services/wireguard/endpoint/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ func (ce *connectionEndpoint) Config() (wg.ServiceConfig, error) {
return config, nil
}

// ReleaseIP releases an IP, so it could be reused later.
func (ce *connectionEndpoint) ReleaseIP(ip net.IPNet) {
ce.resourceAllocator.ReleaseIPNet(ip)
}

// Stop closes wireguard client and destroys wireguard network interface.
func (ce *connectionEndpoint) Stop() error {
if err := ce.wgClient.Close(); err != nil {
Expand Down
1 change: 0 additions & 1 deletion services/wireguard/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ func (mce *mockConnectionEndpoint) ConfigureRoutes(_ net.IP) error { retur
func (mce *mockConnectionEndpoint) PeerStats() (wgcfg.Stats, error) {
return wgcfg.Stats{LastHandshake: time.Now()}, nil
}
func (mce *mockConnectionEndpoint) ReleaseIP(ip net.IPNet) {}

func newManagerStub(pub, out, country string) *Manager {
dnsHandler, _ := dns.ResolveViaSystem()
Expand Down

0 comments on commit 483c458

Please sign in to comment.