-
Notifications
You must be signed in to change notification settings - Fork 5
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
[1.0] Add test case to demonstrate the weak masking issue #622
Conversation
Note:start |
nice ascii graph in unittests/savanna_misc_tests.cpp |
// ------------------- | ||
void print(const char* name, const signed_block_ptr& b) const { | ||
if (_debug_mode) | ||
std::cout << name << " ts = " << b->timestamp.slot << ", id = " << b->calculate_id().str().substr(8, 16) |
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.
As this is in debug mode, you can just print out the whole 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.
I missed this cout
, use ilog
and then you can enable via unittest -- --verbose
and you don't need the _debug_mode
.
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 actually like this better because I print only what is relevant for the test.
BOOST_FIXTURE_TEST_CASE(weak_masking_issue, savanna_cluster::cluster_t) try { | ||
auto& A=_nodes[0]; auto& B=_nodes[1]; auto& C=_nodes[2]; auto& D=_nodes[3]; | ||
using vote_t = savanna_cluster::node_t::vote_t; | ||
//_debug_mode = true; |
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 this commented out line.
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 like having it here personally.
Resolves #544.
Branch
gh_544_check
created off commit 7beaa20 prior to PR #537 (implementing the FSI changes to avoid the issue) has the new test failing.