Skip to content

Commit e0755a1

Browse files
committed
Updates to 0.1.8. Fixes issue in blockchain monitor
1 parent 1dd1703 commit e0755a1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Framework/Utils/BlockInterval.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ public BlockInterval(TimeRange timeRange, ulong from, ulong to)
1515
To = from;
1616
}
1717
TimeRange = timeRange;
18+
NumberOfBlocks = (To - From) + 1;
1819
}
1920

2021
public ulong From { get; }
2122
public ulong To { get; }
2223
public TimeRange TimeRange { get; }
23-
public ulong NumberOfBlocks => To - From;
24+
public ulong NumberOfBlocks { get; }
2425

2526
public override string ToString()
2627
{

ProjectPlugins/CodexContractsPlugin/ChainMonitor/ChainState.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,12 @@ private void Apply(ChainEvents events)
7575
throw new Exception(msg);
7676
}
7777

78-
log.Log($"ChainState updating: {events.BlockInterval}");
78+
log.Log($"ChainState updating: {events.BlockInterval} = {events.All.Length} events.");
7979

8080
// Run through each block and apply the events to the state in order.
8181
var span = events.BlockInterval.TimeRange.Duration;
8282
var numBlocks = events.BlockInterval.NumberOfBlocks;
83+
if (numBlocks == 0) return;
8384
var spanPerBlock = span / numBlocks;
8485

8586
var eventUtc = events.BlockInterval.TimeRange.From;

ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace CodexPlugin
77
{
88
public class CodexContainerRecipe : ContainerRecipeFactory
99
{
10-
private const string DefaultDockerImage = "codexstorage/nim-codex:latest-dist-tests";
10+
private const string DefaultDockerImage = "codexstorage/nim-codex:0.1.8-dist-tests";
1111
public const string ApiPortTag = "codex_api_port";
1212
public const string ListenPortTag = "codex_listen_port";
1313
public const string MetricsPortTag = "codex_metrics_port";

0 commit comments

Comments
 (0)