Skip to content

Commit

Permalink
Tell RelayResult to the sender (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Apr 10, 2020
1 parent cb34f79 commit d2c457f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/neo/Ledger/Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 0 additions & 2 deletions tests/neo.UnitTests/Ledger/UT_Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Blockchain.RelayResult>(p => p.Result == VerifyResult.Succeed);

Expand Down

0 comments on commit d2c457f

Please sign in to comment.