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
Use akka.net EventStream #625
Conversation
This sounds good, @erikzhang, EventStream looks like to be a simple and common way for communication with an |
@@ -628,7 +606,7 @@ private void Persist(Block block) | |||
Transaction = tx, | |||
ExecutionResults = execution_results.ToArray() | |||
}; | |||
Distribute(application_executed); | |||
Context.System.EventStream.Publish(application_executed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor thing, the type that was set was PersistedCompleted
, will it also listen to ApplicationExecuted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, who go this message Context.System.EventStream.Publish(application_executed);
?
@@ -46,6 +46,7 @@ public ConsensusService(IActorRef localNode, IActorRef taskManager, Store store, | |||
this.taskManager = taskManager; | |||
this.store = store; | |||
this.context = context; | |||
Context.System.EventStream.Subscribe(Self, typeof(Blockchain.PersistCompleted)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'll need to update Unit tests for this Erik... I remember that TesKit also had an EventStream system. Perhaps another method on IConsensuContext, I don't know yet... I'll study more, let's see.
No description provided.