2
0
mirror of synced 2025-01-11 09:06:56 +00:00
This commit is contained in:
Ben 2024-06-20 12:15:59 +02:00
parent f7c45d17d7
commit cc3eddf02d
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
3 changed files with 14 additions and 9 deletions

View File

@ -23,9 +23,7 @@ namespace CodexContractsPlugin.Marketplace
{
get
{
var id = "";
foreach (var b in RequestId) id += b.ToString();
return id;
return BitConverter.ToString(RequestId).Replace("-", "").ToLowerInvariant();
}
}
}

View File

@ -53,7 +53,7 @@ namespace CodexTests.UtilityTests
purchaseContract.WaitForStorageContractFinished();
Thread.Sleep(rewarderInterval * 2);
Thread.Sleep(rewarderInterval * 3);
apiCalls.Stop();
chainState.Update();
@ -76,14 +76,14 @@ namespace CodexTests.UtilityTests
private void OnCommand(GiveRewardsCommand call)
{
Log($"API call:");
Log($"<API call>");
foreach (var a in call.Averages)
{
Log("Average: " + JsonConvert.SerializeObject(a));
Log("\tAverage: " + JsonConvert.SerializeObject(a));
}
foreach (var e in call.EventsOverview)
{
Log("Event: " + e);
Log("\tEvent: " + e);
}
foreach (var r in call.Rewards)
{
@ -92,9 +92,10 @@ namespace CodexTests.UtilityTests
foreach (var address in r.UserAddresses)
{
var user = IdentifyAccount(address);
Log("Reward: " + user + ": " + reward.Message);
Log("\tReward: " + user + ": " + reward.Message);
}
}
Log($"</API call>");
}
private IStoragePurchaseContract ClientPurchasesStorage(ICodexNode client)

View File

@ -40,7 +40,7 @@ namespace TestNetRewarder
chainState.Update(timeRange.To);
var averages = marketTracker.GetAverages();
var lines = bufferLogger.Get();
var lines = RemoveFirstLine(bufferLogger.Get());
var request = builder.Build(averages, lines);
if (request.HasAny())
@ -54,5 +54,11 @@ namespace TestNetRewarder
throw;
}
}
private string[] RemoveFirstLine(string[] lines)
{
if (!lines.Any()) return Array.Empty<string>();
return lines.Skip(1).ToArray();
}
}
}