mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-05 23:13:08 +00:00
Adds short-format UTC to block header for each chain-events channel entry.
This commit is contained in:
parent
200de1d7f7
commit
6a8c74e02a
@ -31,7 +31,7 @@ namespace BiblioTech.Rewards
|
||||
{
|
||||
var @event = ApplyReplacements(users, e);
|
||||
await eventsChannel.SendMessageAsync(@event);
|
||||
await Task.Delay(3000);
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using CodexContractsPlugin;
|
||||
using CodexContractsPlugin.ChainMonitor;
|
||||
using GethPlugin;
|
||||
using System.Globalization;
|
||||
using System.Numerics;
|
||||
using Utils;
|
||||
|
||||
@ -76,7 +77,7 @@ namespace TestNetRewarder
|
||||
|
||||
private void AddRequestBlock(RequestEvent requestEvent, string eventName, params string[] content)
|
||||
{
|
||||
var blockNumber = $"[{requestEvent.Block.BlockNumber}]";
|
||||
var blockNumber = $"[{requestEvent.Block.BlockNumber} {FormatDateTime(requestEvent.Block.Utc)}]";
|
||||
var title = $"{blockNumber} **{eventName}** `{requestEvent.Request.Request.Id}`";
|
||||
AddBlock(title, content);
|
||||
}
|
||||
@ -107,6 +108,11 @@ namespace TestNetRewarder
|
||||
) + nl + nl;
|
||||
}
|
||||
|
||||
private string FormatDateTime(DateTime utc)
|
||||
{
|
||||
return utc.ToString("yyyy-MM-dd HH:mm:ss UTC", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
private string BigIntToDuration(BigInteger big)
|
||||
{
|
||||
var span = TimeSpan.FromSeconds((int)big);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user