Skip to content
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: Add a new set_finalizer (with weights, threshold, and local finalizer) to libtester and add more tests using it #2208

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Feb 5, 2024

  • Add a new set_finalizer which takes threshold, weight and local finalizers as arguments
  • Using the new function, add tests threshold_equal_to_half_weight_sum_test, votes_equal_to_threshold_test, votes_greater_than_threshold_test, and votes_less_than_threshold_test.

Resolved #2193

…o libtester; add more unittests for finality transition using the new function
@linh2931 linh2931 requested review from greg7mdp and heifner February 5, 2024 18:55
@linh2931 linh2931 linked an issue Feb 5, 2024 that may be closed by this pull request
libraries/testing/tester.cpp Outdated Show resolved Hide resolved
unittests/api_tests.cpp Outdated Show resolved Hide resolved
"alice"_n, "bob"_n, "carol"_n
};

base_tester::finalizer_policy_input ploicy_input = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type in all the ploicy_input.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will correct them.


// libtester uses 1 as weight of each of the finalizer, sets (2/3 finalizers + 1)
// as threshold, and makes all finalizers vote QC
transaction_trace_ptr set_finalizers(const vector<account_name>& finalier_names);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in finalier_names

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

…onst finalizer_policy_input&); correct 2 typos
@linh2931 linh2931 requested a review from heifner February 6, 2024 01:30
@linh2931 linh2931 merged commit ed4209f into hotstuff_integration Feb 6, 2024
26 checks passed
@linh2931 linh2931 deleted the new_activate_if_unittest branch February 6, 2024 03:18
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Updated set finalizer which takes threshold, weight and local finalizers as arguments.
Note:end

@ericpassmore
Copy link
Contributor

Note:start
category: Tests
component: Internal
summary: Updated set finalizer which takes threshold, weight and local finalizers as arguments.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants