diff --git a/ProjectPlugins/CodexPlugin/ApiChecker.cs b/ProjectPlugins/CodexPlugin/ApiChecker.cs index ba799e60..4b190b34 100644 --- a/ProjectPlugins/CodexPlugin/ApiChecker.cs +++ b/ProjectPlugins/CodexPlugin/ApiChecker.cs @@ -10,7 +10,7 @@ namespace CodexPlugin public class ApiChecker { // - private const string OpenApiYamlHash = "FD-C8-0F-19-5E-14-09-C9-05-93-17-4A-97-50-1D-7E-37-50-B2-30-B2-E6-66-37-23-FA-35-F5-AB-A0-C6-BD"; + private const string OpenApiYamlHash = "06-B9-41-E8-C8-6C-DE-01-86-83-F3-9A-E4-AC-E7-30-D9-E6-64-60-E0-21-81-9E-4E-C5-93-77-2C-71-79-14"; private const string OpenApiFilePath = "/codex/openapi.yaml"; private const string DisableEnvironmentVariable = "CODEXPLUGIN_DISABLE_APICHECK"; diff --git a/ProjectPlugins/GethPlugin/GethNode.cs b/ProjectPlugins/GethPlugin/GethNode.cs index 9cd11ac3..e94a5e09 100644 --- a/ProjectPlugins/GethPlugin/GethNode.cs +++ b/ProjectPlugins/GethPlugin/GethNode.cs @@ -31,8 +31,7 @@ namespace GethPlugin List> GetEvents(string address, TimeRange timeRange) where TEvent : IEventDTO, new(); BlockInterval ConvertTimeRangeToBlockRange(TimeRange timeRange); BlockTimeEntry GetBlockForNumber(ulong number); - void IterateFunctionCalls(BlockInterval blockInterval, Action onCall) where TFunc : FunctionMessage; - + void IterateFunctionCalls(BlockInterval blockInterval, Action onCall) where TFunc : FunctionMessage, new(); } public class DeploymentGethNode : BaseGethNode, IGethNode @@ -199,8 +198,11 @@ namespace GethPlugin foreach (var t in blk.Transactions) { - var func = t.DecodeTransactionToFunctionMessage(); - if (func != null) onCall(func); + if (t.IsTransactionForFunctionMessage()) + { + var func = t.DecodeTransactionToFunctionMessage(); + if (func != null) onCall(func); + } } } } diff --git a/Tests/CodexReleaseTests/MarketTests/ContractSuccessfulTest.cs b/Tests/CodexReleaseTests/MarketTests/ContractSuccessfulTest.cs index a89059f3..51f9b79b 100644 --- a/Tests/CodexReleaseTests/MarketTests/ContractSuccessfulTest.cs +++ b/Tests/CodexReleaseTests/MarketTests/ContractSuccessfulTest.cs @@ -39,7 +39,6 @@ namespace CodexReleaseTests.MarketTests request.WaitForStorageContractSubmitted(); AssertContractIsOnChain(request); - WaitUntilSlotReservationsFull(request); WaitForContractStarted(request); AssertContractSlotsAreFilledByHosts(request, hosts); diff --git a/Tests/CodexReleaseTests/MarketTests/MarketplaceAutoBootstrapDistTest.cs b/Tests/CodexReleaseTests/MarketTests/MarketplaceAutoBootstrapDistTest.cs index b6f624db..146cc993 100644 --- a/Tests/CodexReleaseTests/MarketTests/MarketplaceAutoBootstrapDistTest.cs +++ b/Tests/CodexReleaseTests/MarketTests/MarketplaceAutoBootstrapDistTest.cs @@ -345,39 +345,6 @@ namespace CodexReleaseTests.MarketTests }, nameof(AssertContractIsOnChain)); } - protected void WaitUntilSlotReservationsFull(IStoragePurchaseContract contract) - { - var requestId = contract.PurchaseId.ToLowerInvariant(); - var slots = contract.Purchase.MinRequiredNumberOfNodes; - - var timeout = TimeSpan.FromMinutes(1.0); - var start = DateTime.UtcNow; - var fullIndices = new List(); - - while (DateTime.UtcNow - start < timeout) - { - Thread.Sleep(TimeSpan.FromSeconds(3.0)); - - var fullEvents = GetContracts().GetEvents(GetTestRunTimeRange()).GetSlotReservationsFullEvents(); - foreach (var e in fullEvents) - { - if (e.RequestId.ToHex().ToLowerInvariant() == requestId) - { - if (!fullIndices.Contains(e.SlotIndex)) - { - fullIndices.Add(e.SlotIndex); - if (fullIndices.Count == slots) return; - } - } - } - } - - Assert.Fail( - $"Slot reservations were not full after {Time.FormatDuration(timeout)}." + - $" Slots: {slots} Filled: {string.Join(",", fullIndices.Select(i => i.ToString()))}" - ); - } - protected void AssertOnChainEvents(Action onEvents, string description) { Time.Retry(() => diff --git a/Tests/CodexReleaseTests/MarketTests/MultipleContractsTest.cs b/Tests/CodexReleaseTests/MarketTests/MultipleContractsTest.cs index e5588efb..df71eb3b 100644 --- a/Tests/CodexReleaseTests/MarketTests/MultipleContractsTest.cs +++ b/Tests/CodexReleaseTests/MarketTests/MultipleContractsTest.cs @@ -57,7 +57,6 @@ namespace CodexReleaseTests.MarketTests AssertContractIsOnChain(r); }); - All(requests, WaitUntilSlotReservationsFull); All(requests, WaitForContractStarted); // for the time being, we're only interested in whether these contracts start.