wip
This commit is contained in:
parent
f7c45d17d7
commit
cc3eddf02d
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user