-
Notifications
You must be signed in to change notification settings - Fork 3
leanMultisig aggregation #47
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
Conversation
| } | ||
| if (not justifications_it->second.at(validator_id)) { | ||
| justifications_it->second.at(validator_id) = true; | ||
| for (auto &&validator_id : |
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.
Why validator_id is rvalue? It doesn't make sense here, do nothing, but confuses a bit.
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.
auto && is not rvalue, it means that deduced auto may accept both value and reference.
auto c = ref; // copy constructor
auto &c = ref; // reference
auto c = 1; // int c
auto &c = 1; // error
const auto &c = 1; // const int &c
auto &&c = ref; // reference
auto &&c = 1; // int cThere 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.
Yes, and it makes sense in templates only. In this case, the type will be inferred unambiguously from the return value of the function getAggregatedValidators.
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
| } | ||
| if (not justifications_it->second.at(validator_id)) { | ||
| justifications_it->second.at(validator_id) = true; | ||
| for (auto &&validator_id : |
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.
Yes, and it makes sense in templates only. In this case, the type will be inferred unambiguously from the return value of the function getAggregatedValidators.
Signed-off-by: turuslan <turuslan.devbox@gmail.com> # Conflicts: # src/blockchain/fork_choice.cpp
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.