Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Jul 1, 2019
1 parent 1799197 commit 7d6f2cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions neo.UnitTests/UT_RemoteNode.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
ο»Ώusing Akka.Actor;
using Akka.IO;
ο»Ώusing Akka.IO;
using Akka.TestKit.Xunit2;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Neo.Network.P2P;
using Neo.Network.P2P.Capabilities;
using Neo.Network.P2P.Payloads;
using System;
using System.Collections.Generic;
using System.Text;

namespace Neo.UnitTests
{
Expand All @@ -19,6 +16,11 @@ 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}\" }}")
{
}

This comment has been minimized.

Copy link
@igormcoelho

igormcoelho Jul 1, 2019

Contributor

Man, whats this???? Pure magic!! Finally someone managed to set mailboxes correctly for TestKit xD

πŸ‘ πŸ‘ πŸ‘ πŸ‘ πŸ‘

@lock9 see this


[ClassInitialize]
public static void TestSetup(TestContext ctx)
Expand Down
2 changes: 1 addition & 1 deletion neo/Network/P2P/RemoteNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public RemoteNode(NeoSystem system, object connection, IPEndPoint remote, IPEndP
: base(connection, remote, local)
{
this.system = system;
this.protocol = system.ActorSystem.ActorOf(ProtocolHandler.Props(system));
this.protocol = Context.ActorOf(ProtocolHandler.Props(system));

This comment has been minimized.

Copy link
@igormcoelho

igormcoelho Jul 1, 2019

Contributor

Congratulation Erik πŸ‘

LocalNode.Singleton.RemoteNodes.TryAdd(Self, this);

var capabilities = new List<NodeCapability>
Expand Down

0 comments on commit 7d6f2cd

Please sign in to comment.