Updates to 0.1.8. Fixes issue in blockchain monitor
This commit is contained in:
parent
1dd17037ba
commit
e0755a1101
|
@ -15,12 +15,13 @@
|
||||||
To = from;
|
To = from;
|
||||||
}
|
}
|
||||||
TimeRange = timeRange;
|
TimeRange = timeRange;
|
||||||
|
NumberOfBlocks = (To - From) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong From { get; }
|
public ulong From { get; }
|
||||||
public ulong To { get; }
|
public ulong To { get; }
|
||||||
public TimeRange TimeRange { get; }
|
public TimeRange TimeRange { get; }
|
||||||
public ulong NumberOfBlocks => To - From;
|
public ulong NumberOfBlocks { get; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,11 +75,12 @@ namespace CodexContractsPlugin.ChainMonitor
|
||||||
throw new Exception(msg);
|
throw new Exception(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Log($"ChainState updating: {events.BlockInterval}");
|
log.Log($"ChainState updating: {events.BlockInterval} = {events.All.Length} events.");
|
||||||
|
|
||||||
// Run through each block and apply the events to the state in order.
|
// Run through each block and apply the events to the state in order.
|
||||||
var span = events.BlockInterval.TimeRange.Duration;
|
var span = events.BlockInterval.TimeRange.Duration;
|
||||||
var numBlocks = events.BlockInterval.NumberOfBlocks;
|
var numBlocks = events.BlockInterval.NumberOfBlocks;
|
||||||
|
if (numBlocks == 0) return;
|
||||||
var spanPerBlock = span / numBlocks;
|
var spanPerBlock = span / numBlocks;
|
||||||
|
|
||||||
var eventUtc = events.BlockInterval.TimeRange.From;
|
var eventUtc = events.BlockInterval.TimeRange.From;
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace CodexPlugin
|
||||||
{
|
{
|
||||||
public class CodexContainerRecipe : ContainerRecipeFactory
|
public class CodexContainerRecipe : ContainerRecipeFactory
|
||||||
{
|
{
|
||||||
private const string DefaultDockerImage = "codexstorage/nim-codex:latest-dist-tests";
|
private const string DefaultDockerImage = "codexstorage/nim-codex:0.1.8-dist-tests";
|
||||||
public const string ApiPortTag = "codex_api_port";
|
public const string ApiPortTag = "codex_api_port";
|
||||||
public const string ListenPortTag = "codex_listen_port";
|
public const string ListenPortTag = "codex_listen_port";
|
||||||
public const string MetricsPortTag = "codex_metrics_port";
|
public const string MetricsPortTag = "codex_metrics_port";
|
||||||
|
|
Loading…
Reference in New Issue