From 6668d90d31393641c99a135dd9981ad13c8f5007 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Thu, 22 Aug 2024 15:16:25 +0200 Subject: [PATCH] e2e: fix TestFormContract --- internal/test/e2e/contracts_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/test/e2e/contracts_test.go b/internal/test/e2e/contracts_test.go index fcafdd2ac..25f74fa8d 100644 --- a/internal/test/e2e/contracts_test.go +++ b/internal/test/e2e/contracts_test.go @@ -35,10 +35,10 @@ func TestFormContract(t *testing.T) { tt.OK(err) // form a contract using the bus - cs, _ := b.ConsensusState(context.Background()) wallet, _ := b.Wallet(context.Background()) - endHeight := cs.BlockHeight + test.AutopilotConfig.Contracts.Period + test.AutopilotConfig.Contracts.RenewWindow - contract, err := b.FormContract(context.Background(), wallet.Address, types.Siacoins(1), h.PublicKey, h.NetAddress, types.Siacoins(1), endHeight) + ap, err := b.Autopilot(context.Background(), api.DefaultAutopilotID) + tt.OK(err) + contract, err := b.FormContract(context.Background(), wallet.Address, types.Siacoins(1), h.PublicKey, h.NetAddress, types.Siacoins(1), ap.EndHeight()) tt.OK(err) // assert the contract was added to the bus