Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update akka to 1.4.2 #1466

Merged
merged 16 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/neo/Consensus/ConsensusService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Akka.Actor;
using Akka.Configuration;
using Hocon;
using Neo.Cryptography;
using Neo.IO;
using Neo.IO.Actors;
Expand Down
2 changes: 1 addition & 1 deletion src/neo/IO/Actors/PriorityMailbox.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Akka.Actor;
using Akka.Configuration;
using Akka.Dispatch;
using Akka.Dispatch.MessageQueues;
using Hocon;
using System.Collections;

namespace Neo.IO.Actors
Expand Down
2 changes: 1 addition & 1 deletion src/neo/Ledger/Blockchain.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Akka.Actor;
using Akka.Configuration;
using Hocon;
using Neo.Cryptography.ECC;
using Neo.IO;
using Neo.IO.Actors;
Expand Down
15 changes: 8 additions & 7 deletions src/neo/NeoSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Akka.Actor;
using Hocon;
using Neo.Consensus;
using Neo.Ledger;
using Neo.Network.P2P;
Expand All @@ -11,13 +12,13 @@ namespace Neo
{
public class NeoSystem : IDisposable
{
public ActorSystem ActorSystem { get; } = ActorSystem.Create(nameof(NeoSystem),
$"akka {{ log-dead-letters = off }}" +
$"blockchain-mailbox {{ mailbox-type: \"{typeof(BlockchainMailbox).AssemblyQualifiedName}\" }}" +
$"task-manager-mailbox {{ mailbox-type: \"{typeof(TaskManagerMailbox).AssemblyQualifiedName}\" }}" +
$"remote-node-mailbox {{ mailbox-type: \"{typeof(RemoteNodeMailbox).AssemblyQualifiedName}\" }}" +
$"protocol-handler-mailbox {{ mailbox-type: \"{typeof(ProtocolHandlerMailbox).AssemblyQualifiedName}\" }}" +
$"consensus-service-mailbox {{ mailbox-type: \"{typeof(ConsensusServiceMailbox).AssemblyQualifiedName}\" }}");
public ActorSystem ActorSystem { get; } = ActorSystem.Create(nameof(NeoSystem), HoconConfigurationFactory.ParseString("akka.log-dead-letters = off")
.WithFallback(HoconConfigurationFactory.ParseString($"blockchain-mailbox {{ mailbox-type: \"{typeof(BlockchainMailbox).AssemblyQualifiedName}\" }}"))
.WithFallback(HoconConfigurationFactory.ParseString($"task-manager-mailbox {{ mailbox-type: \"{typeof(TaskManagerMailbox).AssemblyQualifiedName}\" }}"))
.WithFallback(HoconConfigurationFactory.ParseString($"remote-node-mailbox {{ mailbox-type: \"{typeof(RemoteNodeMailbox).AssemblyQualifiedName}\" }}"))
.WithFallback(HoconConfigurationFactory.ParseString($"protocol-handler-mailbox {{ mailbox-type: \"{typeof(ProtocolHandlerMailbox).AssemblyQualifiedName}\" }}"))
.WithFallback(HoconConfigurationFactory.ParseString($"consensus-service-mailbox {{ mailbox-type: \"{typeof(ConsensusServiceMailbox).AssemblyQualifiedName}\" }}"))
.WithFallback(HoconConfigurationFactory.Default()));
public IActorRef Blockchain { get; }
public IActorRef LocalNode { get; }
internal IActorRef TaskManager { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/neo/Network/P2P/ProtocolHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Akka.Actor;
using Akka.Configuration;
using Hocon;
using Neo.Cryptography;
using Neo.IO;
using Neo.IO.Actors;
Expand Down
2 changes: 1 addition & 1 deletion src/neo/Network/P2P/RemoteNode.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Akka.Actor;
using Akka.Configuration;
using Hocon;
using Akka.IO;
using Neo.Cryptography;
using Neo.IO;
Expand Down
2 changes: 1 addition & 1 deletion src/neo/Network/P2P/TaskManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Akka.Actor;
using Akka.Configuration;
using Hocon;
using Neo.IO.Actors;
using Neo.IO.Caching;
using Neo.Ledger;
Expand Down
2 changes: 1 addition & 1 deletion src/neo/neo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka" Version="1.3.16" />
<PackageReference Include="Akka" Version="1.4.1-rc1" />
erikzhang marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="K4os.Compression.LZ4" Version="1.1.11" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.2.1" />
Expand Down
6 changes: 4 additions & 2 deletions tests/neo.UnitTests/Network/P2P/UT_RemoteNode.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Akka.IO;
using Akka.TestKit.Xunit2;
using FluentAssertions;
using Hocon;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Neo.Network.P2P;
using Neo.Network.P2P.Capabilities;
Expand All @@ -15,8 +16,9 @@ public class UT_RemoteNode : TestKit
private static NeoSystem testBlockchain;

public UT_RemoteNode()
: base($"remote-node-mailbox {{ mailbox-type: \"{typeof(RemoteNodeMailbox).AssemblyQualifiedName}\" }}" +
$"protocol-handler-mailbox {{ mailbox-type: \"{typeof(ProtocolHandlerMailbox).AssemblyQualifiedName}\" }}")
: base(HoconConfigurationFactory.ParseString($"remote-node-mailbox {{ mailbox-type: \"{typeof(RemoteNodeMailbox).AssemblyQualifiedName}\" }}")
.WithFallback(HoconConfigurationFactory.ParseString($"protocol-handler-mailbox {{ mailbox-type: \"{typeof(ProtocolHandlerMailbox).AssemblyQualifiedName}\" }}")
.WithFallback(HoconConfigurationFactory.Default())))
{
}

Expand Down
4 changes: 2 additions & 2 deletions tests/neo.UnitTests/neo.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="Akka.TestKit" Version="1.3.16" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.3.16" />
<PackageReference Include="Akka.TestKit" Version="1.4.1-rc1" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.4.1-rc1" />
</ItemGroup>

<ItemGroup>
Expand Down