Checking onchain events to debug missing slotFilled event

This commit is contained in:
Ben 2024-03-28 13:49:02 +01:00
parent 581cf2a813
commit 4f461e4cb3
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
1 changed files with 9 additions and 0 deletions

View File

@ -107,6 +107,15 @@ namespace CodexTests.BasicTests
var purchaseContract = buyer.Marketplace.RequestStorage(purchase);
Time.Retry(() =>
{
var slotFilledEvents = contracts.GetSlotFilledEvents(GetTestRunTimeRange());
Log($"SlotFilledEvents: {slotFilledEvents.Length} - NumSlots: {purchase.MinRequiredNumberOfNodes}");
if (slotFilledEvents.Length != purchase.MinRequiredNumberOfNodes) throw new Exception("not yet");
}, Convert.ToInt32(purchase.Duration.TotalSeconds / 2) + 10, TimeSpan.FromSeconds(2), "Checking SlotFilled events");
purchaseContract.WaitForStorageContractStarted();
AssertBalance(contracts, seller, Is.LessThan(sellerInitialBalance), "Collateral was not placed.");