Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap committed Oct 29, 2024
1 parent f89e644 commit 67e2a8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Nethermind/Nethermind.Era1/EraModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ protected override void Load(ContainerBuilder builder)
.AddSingleton<EraCliRunner>()
.AddSingleton<IAdminEraService, AdminEraService>();

builder.RegisterBuildCallback((ctx) =>
builder.RegisterBuildCallback((ctx) =>
{
ctx.Resolve<IEraConfig>().NetworkName ??= BlockchainIds.GetBlockchainName(ctx.Resolve<ISpecProvider>().NetworkId);
IEraConfig eraConfig = ctx.Resolve<IEraConfig>();
if (string.IsNullOrWhiteSpace(eraConfig.NetworkName))
{
eraConfig.NetworkName = BlockchainIds.GetBlockchainName(ctx.Resolve<ISpecProvider>().NetworkId);
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public static NethermindApi ContextWithMocks()
BetterPeerStrategy = Substitute.For<IBetterPeerStrategy>(),
ReceiptMonitor = Substitute.For<IReceiptMonitor>(),
BadBlocksStore = Substitute.For<IBadBlockStore>(),
ProcessExit = Substitute.For<IProcessExitSource>(),

ApiWithNetworkServiceContainer = new ContainerBuilder()
.AddSingleton(Substitute.For<ISyncModeSelector>())
Expand Down

0 comments on commit 67e2a8c

Please sign in to comment.