diff --git a/internal/rhp/v4/rhp.go b/internal/rhp/v4/rhp.go index ccc384f29..877e396e9 100644 --- a/internal/rhp/v4/rhp.go +++ b/internal/rhp/v4/rhp.go @@ -118,7 +118,7 @@ func (c *Client) FundAccounts(ctx context.Context, hk types.PublicKey, hostIP st // LatestRevision returns the latest revision of a contract. func (c *Client) LatestRevision(ctx context.Context, hk types.PublicKey, addr string, contractID types.FileContractID) (revision types.V2FileContract, _ error) { - err := c.tpool.withTransport(ctx, hk, addr, func(c rhp.TransportClient) (err error) { + err := c.tpool.withTransport(ctx, hk, addr, func(c rhp.TransportClient) error { res, err := rhp.RPCLatestRevision(ctx, c, contractID) revision = res.Contract return err diff --git a/internal/test/e2e/host.go b/internal/test/e2e/host.go index 5aa01ed3c..8248182b7 100644 --- a/internal/test/e2e/host.go +++ b/internal/test/e2e/host.go @@ -17,6 +17,7 @@ import ( "go.sia.tech/coreutils/chain" rhp4 "go.sia.tech/coreutils/rhp/v4" "go.sia.tech/coreutils/syncer" + "go.sia.tech/coreutils/testutil" "go.sia.tech/coreutils/wallet" "go.sia.tech/hostd/host/accounts" "go.sia.tech/hostd/host/contracts" @@ -307,7 +308,7 @@ func NewHost(privKey types.PrivateKey, cm *chain.Manager, dir string, network *c rhpv3 := rhpv3.NewSessionHandler(rhp3Listener, privKey, cm, s, wallet, accounts, contracts, registry, storage, settings, log.Named("rhpv3")) go rhpv3.Serve() - rhpv4 := rhp4.NewServer(privKey, cm, s, contracts, wallet, settings, storage, rhp4.WithPriceTableValidity(30*time.Minute)) + rhpv4 := rhp4.NewServer(privKey, cm, s, testutil.NewEphemeralContractor(cm), wallet, settings, storage, rhp4.WithPriceTableValidity(30*time.Minute)) go rhp.ServeRHP4SiaMux(rhp4Listener, rhpv4, log.Named("rhp4")) return &Host{