From 9c83db57806c8c178cf951cd4f14acc1af3aab1a Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Thu, 12 Dec 2024 11:43:56 +0100 Subject: [PATCH] fix TestDownloadAllHosts --- autopilot/migrator.go | 3 ++- internal/rhp/v4/rhp.go | 6 ------ internal/test/e2e/cluster_test.go | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/autopilot/migrator.go b/autopilot/migrator.go index e13076111..43d15499e 100644 --- a/autopilot/migrator.go +++ b/autopilot/migrator.go @@ -154,7 +154,8 @@ func (m *migrator) performMigrations(p *workerPool) { } else if err != nil { m.logger.Errorw("migration failed", zap.Float64("health", j.Health), - zap.Stringer("slab", j.EncryptionKey)) + zap.Stringer("slab", j.EncryptionKey), + zap.Error(err)) } } }(w) diff --git a/internal/rhp/v4/rhp.go b/internal/rhp/v4/rhp.go index eb656e7d3..4bb9471df 100644 --- a/internal/rhp/v4/rhp.go +++ b/internal/rhp/v4/rhp.go @@ -5,7 +5,6 @@ import ( "errors" "io" "net" - "strings" "time" "go.sia.tech/core/consensus" @@ -140,11 +139,6 @@ func (c *Client) AccountBalance(ctx context.Context, hk types.PublicKey, hostIP err := c.tpool.withTransport(ctx, hk, hostIP, func(c rhp.TransportClient) (err error) { balance, err = rhp.RPCAccountBalance(ctx, c, account) if err != nil { - // TODO: remove this hack once the host is fixed - if strings.Contains(err.Error(), "internal error") { - err = nil - balance = types.ZeroCurrency - } return err } return err diff --git a/internal/test/e2e/cluster_test.go b/internal/test/e2e/cluster_test.go index f70e130b2..88cfa5cdd 100644 --- a/internal/test/e2e/cluster_test.go +++ b/internal/test/e2e/cluster_test.go @@ -2564,7 +2564,7 @@ func TestDownloadAllHosts(t *testing.T) { var randomHost []string for _, host := range cluster.hosts { if _, used := usedHosts[host.PublicKey()]; used { - randomHost = []string{host.settings.Settings().NetAddress, host.RHPv4Addr()} + randomHost = []string{host.RHPv2Addr(), host.RHPv4Addr()} break } }