-
Notifications
You must be signed in to change notification settings - Fork 100
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
[DBFTPlugin] Dbft constructor #545
[DBFTPlugin] Dbft constructor #545
Conversation
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.
Wait for @superboyiii tests
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.
Settings.Default should be eliminated
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.
I still need a mechanism to pass custom settings to DBFTPlugin
. I suggested adding an optional settings parameter to DBFTPlugin.Start
method
src/DBFTPlugin/DBFTPlugin.cs
Outdated
{ | ||
if (started) return; | ||
started = true; | ||
if (settings != null) this.settings = settings; | ||
consensus = neoSystem.ActorSystem.ActorOf(ConsensusService.Props(neoSystem, settings, wallet)); |
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.
you're missing a this
on line 61. when there's a method parameter and class field with the same identitifer (aka settings
) you need to use this.
to distinguish between them. The way the code is now, the settings passed to ConsensusService.Props
will always be the parameter settings
, even if it's null.
consensus = neoSystem.ActorSystem.ActorOf(ConsensusService.Props(neoSystem, this.settings, wallet));
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.
Fix the missing this.
in Start and it looks good to me
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.
still waiting on the this.
fix in Start
Done. |
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.
Tested?
@devhawk Can you review it again? |
Merge? |
* provide settings in dbft constructor * remove static * rename * Erik's feedback * original RecoveryMessage.Deserialize with extra check * Remove Settings.Default * message type read once * Harry's suggestion * Revert dummy changes * this * add verify * Clean enter * Remove () * Update * use byte.MaxValue * Remove cast Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Erik Zhang <erik@neo.org>
Close #455 #543 #544
Changes:
ConsensusService
andConsensusContext
.@erikzhang @shargon @devhawk