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

Use akka.net EventStream #625

Merged
merged 1 commit into from Mar 7, 2019
Merged

Use akka.net EventStream #625

merged 1 commit into from Mar 7, 2019

Conversation

erikzhang
Copy link
Member

No description provided.

@vncoelho
Copy link
Member

vncoelho commented Mar 7, 2019

This sounds good, @erikzhang, EventStream looks like to be a simple and common way for communication with an EventBus.

@@ -628,7 +606,7 @@ private void Persist(Block block)
Transaction = tx,
ExecutionResults = execution_results.ToArray()
};
Distribute(application_executed);
Context.System.EventStream.Publish(application_executed);
Copy link
Member

@vncoelho vncoelho Mar 7, 2019

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Member

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);?

@erikzhang erikzhang merged commit 9831f30 into master Mar 7, 2019
@erikzhang erikzhang deleted the feature/EventStream branch March 7, 2019 15:17
@@ -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));
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants