-
Notifications
You must be signed in to change notification settings - Fork 31
IF: Do not set new proposer policy unless different #68
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
libraries/chain/controller.cpp
Outdated
| if (auto itr = parent.proposer_policies.find(active_time); itr != parent.proposer_policies.cend()) { | ||
| return itr->second->proposer_schedule.version; // will replace so return same version | ||
| // returns the next proposer schedule version and true if different | ||
| // if producers is not different then returns the current schedule version (or next schedule version) |
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.
Remove the leading spaces.
|
|
||
| const producer_authority_schedule& lhs = get_next_sched(); | ||
|
|
||
| if (std::ranges::equal(lhs.producers, producers)) { |
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 curious, any reason why you use std::ranges::equal() instead of operator==() on the vectors?
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.
Only because that is what legacy does. Should be the same.
|
Hum, I kept looking at it some more and I don't think it behaves as the previous code did. and we don't remove any existing proposed_schedule set earlier in this block (with So am I correct that we have not removed the one set earlier in the block, and should have been superseded by the new one which is identical to the previously active one? |
|
Note:start |
Resolves #6