-
Notifications
You must be signed in to change notification settings - Fork 804
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
Add terminal block hash and number to Ropsten genesis file #4026
Add terminal block hash and number to Ropsten genesis file #4026
Conversation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
9cc615b
to
0e7a7d7
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
validators.add( | ||
new DaoForkPeerValidator(protocolSchedule, metricsSystem, daoBlock.getAsLong())); | ||
} | ||
configOptionsSupplier |
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.
This is less readable than an if block.
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 usually find the lambda version more effective to describe what to do in case of something is present, and less error prone, but I can easily read both versions, so I will revert.
|
||
for (final Map.Entry<Long, Hash> requiredBlock : requiredBlocks.entrySet()) { | ||
validators.add( | ||
new RequiredBlocksPeerValidator( | ||
protocolSchedule, metricsSystem, requiredBlock.getKey(), requiredBlock.getValue())); | ||
} | ||
|
||
configOptionsSupplier |
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.
This is not as readable as a couple of if
blocks. Two if blocks would make it obvious we are adding a config if two config items are persent. get().get().filter(...).ifPresent(...) is much too verbose, especially when one of the ifPresent paths is nested.
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.
done
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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.
LGTM
…yperledger#4026)" This reverts commit 27fc468. Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
…yperledger#4026)" This reverts commit 27fc468.
…yperledger#4026)" This reverts commit 27fc468. Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…er#4026) Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * If terminal block is present in the genesis, then peers must have it Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * Update unit test Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> * address review comments Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…yperledger#4026)" (hyperledger#4093) This reverts commit 27fc468. Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net
PR description
Add terminal block hash and number to Ropsten genesis file, and also require that peers on Ropsten must have that block
Fixed Issue(s)
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog