From 445918e038478d2f2b36f365131643c4567fa20b Mon Sep 17 00:00:00 2001 From: Erik Zhang Date: Fri, 10 Apr 2020 15:11:40 +0800 Subject: [PATCH] Tell RelayResult to the sender (#1548) --- src/neo/Ledger/Blockchain.cs | 1 + tests/neo.UnitTests/Ledger/UT_Blockchain.cs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/neo/Ledger/Blockchain.cs b/src/neo/Ledger/Blockchain.cs index f36784d89b..54a4f26327 100644 --- a/src/neo/Ledger/Blockchain.cs +++ b/src/neo/Ledger/Blockchain.cs @@ -304,6 +304,7 @@ private void OnInventory(IInventory inventory, bool relay = true) }; if (relay && rr.Result == VerifyResult.Succeed) system.LocalNode.Tell(new LocalNode.RelayDirectly { Inventory = inventory }); + Sender.Tell(rr); Context.System.EventStream.Publish(rr); } diff --git a/tests/neo.UnitTests/Ledger/UT_Blockchain.cs b/tests/neo.UnitTests/Ledger/UT_Blockchain.cs index 822a9a70bb..11456371ae 100644 --- a/tests/neo.UnitTests/Ledger/UT_Blockchain.cs +++ b/tests/neo.UnitTests/Ledger/UT_Blockchain.cs @@ -134,8 +134,6 @@ public void TestValidTransaction() var tx = CreateValidTx(walletA, acc.ScriptHash, 0); - system.ActorSystem.EventStream.Subscribe(senderProbe, typeof(Blockchain.RelayResult)); - senderProbe.Send(system.Blockchain, tx); senderProbe.ExpectMsg(p => p.Result == VerifyResult.Succeed);