Skip to content

Commit

Permalink
Fix ambiguous ProtectedPrivateKey
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap committed Oct 18, 2024
1 parent 4cf5b8a commit 4e64380
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Api/IBasicApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public interface IBasicApi
IFileSystem FileSystem { get; set; }
IKeyStore? KeyStore { get; set; }
ILogManager LogManager { get; set; }
[SkipServiceCollection]
ProtectedPrivateKey? OriginalSignerKey { get; set; }
IReadOnlyList<INethermindPlugin> Plugins { get; }
[SkipServiceCollection]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

using System.Net.Sockets;
using System.Runtime.InteropServices;
using Autofac.Features.AttributeFilters;
using DotNetty.Transport.Bootstrapping;
using DotNetty.Transport.Channels;
using DotNetty.Transport.Channels.Sockets;
using Nethermind.Api;
using Nethermind.Core;
using Nethermind.Core.Container;
using Nethermind.Core.Crypto;
using Nethermind.Crypto;
using Nethermind.Db;
Expand Down Expand Up @@ -48,7 +50,7 @@ public class CompositeDiscoveryApp : IDiscoveryApp
private IDiscoveryApp? _v5;
private INodeSource _compositeNodeSource = null!;

public CompositeDiscoveryApp(ProtectedPrivateKey? nodeKey,
public CompositeDiscoveryApp([KeyFilter(ComponentKey.NodeKey)] ProtectedPrivateKey? nodeKey,
INetworkConfig networkConfig, IDiscoveryConfig discoveryConfig, IInitConfig initConfig,
IEthereumEcdsa? ethereumEcdsa, IMessageSerializationService? serializationService,
ILogManager? logManager, ITimestamper? timestamper, ICryptoRandom? cryptoRandom,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// SPDX-License-Identifier: LGPL-3.0-only

using System;
using Autofac.Features.AttributeFilters;
using DotNetty.Buffers;
using DotNetty.Common.Utilities;
using Nethermind.Core.Container;
using Nethermind.Core.Crypto;
using Nethermind.Core.Extensions;
using Nethermind.Crypto;
Expand Down Expand Up @@ -34,7 +36,7 @@ public HandshakeService(
IEciesCipher eciesCipher,
ICryptoRandom cryptoRandom,
IEcdsa ecdsa,
ProtectedPrivateKey privateKey,
[KeyFilter(ComponentKey.NodeKey)] ProtectedPrivateKey privateKey,
ILogManager logManager)
: this(messageSerializationService, eciesCipher, cryptoRandom, ecdsa, privateKey.Unprotect(), logManager)
{
Expand Down

0 comments on commit 4e64380

Please sign in to comment.