-
Notifications
You must be signed in to change notification settings - Fork 73
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
IF: Fix double confirming test failure #2054
Conversation
… not found in existing unittests. Most of these are likely redundant, but change_inflation, votepay_share_invariant, and votepay_transition2 triggered a producer_double-confirming error no other tests found.
//idump((confirm_count[i])); | ||
if( result.confirm_count[i] == 0 ) | ||
{ | ||
--result.confirm_count[i]; |
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 is the space removed?
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 copied over the 5.0 impl, including spaces
#warning Add last_proposed_finalizer_policy_generation to snapshot_block_header_state_v3, see header file TODO | ||
|
||
namespace detail { | ||
uint32_t get_next_next_round_block_num( block_timestamp_type t, uint32_t block_num ) { | ||
auto index = t.slot % config::producer_repetitions; // current index in current round | ||
// (increment to the end of this round ) + next round | ||
return block_num + (config::producer_repetitions - index) + config::producer_repetitions; | ||
} | ||
} | ||
|
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 moved this in a new file in my PR so as not to duplicate, however we can checkin as-is and I'll remove in my PR.
Note:start |
Reference contracts: https://github.com/AntelopeIO/reference-contracts eosio system tests were failing do a double confirmation error. Port of tests from reference contracts to provide same coverage in leap.
Revert unneeded changes in
block_header_state_legacy
since it no longer contains instant finality logic.Add
controller::head_active_producers()
needed bytester
.