Switches blocktime logs to debug

This commit is contained in:
Ben 2024-05-23 11:24:32 +02:00
parent 6e9ea47b7d
commit a749f82ca5
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ namespace NethereumWorkflow.BlockUtils
private ulong Log(Func<ulong> operation)
{
var sw = Stopwatch.Begin(log, nameof(BlockTimeFinder));
var sw = Stopwatch.Begin(log, nameof(BlockTimeFinder), true);
var result = operation();
sw.End($"(Bounds: [{bounds.Genesis.BlockNumber}-{bounds.Current.BlockNumber}] Cache: {cache.Size})");

View File

@ -96,7 +96,7 @@ namespace CodexTests.BasicTests
var blockRange = geth.ConvertTimeRangeToBlockRange(GetTestRunTimeRange());
var slotFilledEvents = contracts.GetSlotFilledEvents(blockRange);
Log($"SlotFilledEvents: {slotFilledEvents.Length} - NumSlots: {purchase.MinRequiredNumberOfNodes}");
Debug($"SlotFilledEvents: {slotFilledEvents.Length} - NumSlots: {purchase.MinRequiredNumberOfNodes}");
if (slotFilledEvents.Length != purchase.MinRequiredNumberOfNodes) throw new Exception();
}, purchase.Expiry + TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(5), "Checking SlotFilled events");