-
Notifications
You must be signed in to change notification settings - Fork 648
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
add support for existing tests after hf1270 #1493
add support for existing tests after hf1270 #1493
Conversation
@oxarbitrage could you print data of the call orders? There should be a difference. |
before HF call orders:
After:
|
The issue is fixed in |
Yes, we need swan_tests (including revivals). I guess we need bitasset_tests as well, but perhaps don't need to update rounding tests. Thanks. |
I added after hf1270 tests to There is an issue with order matching in 1 of them, at Before HF:
After HF:
The rest of them seems to be ok. @abitmore let me know what do you think about this one when you can. Thanks. |
@oxarbitrage that's an old test case which tests behaviors before any recent hard fork. I guess the behavior has changed since 2.0.180612, perhaps change the test case to that date and see what will happen? If it doesn't pass as well, I think we can skip it. |
tests/tests/bitasset_tests.cpp
Outdated
BOOST_CHECK(!db.find<limit_order_object>(sell_id)); | ||
} | ||
// go beyond hard fork 1270 | ||
blocks += generate_blocks(HARDFORK_CORE_1270_TIME, true, skip); |
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.
To be more accurate, here should be
blocks += generate_blocks(HARDFORK_CORE_1270_TIME - mi, true, skip);
blocks += generate_blocks(db.get_dynamic_global_properties().next_maintenance_time, true, skip);
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.
thank you for the suggestion, i actually tried to make it like that everywhere but there are some problems not sure why.
in the case of this particular test(hf_935_test
) when i make the generate block chains i get error:
83898ms th_a bitasset_tests.cpp:1150 test_method ] 10 assert_exception: Assert Exception
prev: popping block would leave head block null
{}
th_a fork_database.cpp:41 pop_block
{}
th_a db_block.cpp:477 pop_block
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.
Make sure you increased blocks
here, aka blocks += generate_blocks(...)
.
By the way, similar code added in previous PR need to be updated as well, E.G.
and also mcr_bug_increase_after1270, mcr_bug_decrease_before1270 and mcr_bug_decrease_after1270. To be more accurate, should generate blocks until the maintenance time but not the hf time. Actually, theoretically some test cases will fail if hf453 and hf1270 happen in the same maintenance interval (in reality we know they aren't, so it's fine). |
Block generation for market and swan tests changed for accuracy at a2d5fac The only one with issues when doing this change is |
The In this commit: 8466e19 i removed that test and use the spot to test hardfork 1270. I am unsure if it is the right thing to do, can revert back. |
The logic around
|
thank you, with the logic described i should be able to make it better. |
By comments in #1324 (comment) the flag for existing tests was added to database fixture.
This pull is not to merge(at least not as it is) but it is for discussion of some issues found in the existing tests after the hardfork.
Trying to give support for the following existing test cases:
The first 3 tests pass after hardfork, only mod needed is on
hardfork_core_338_test
that use call price to do some checks. This is not allowed after HF1270, order matching is as expected.In the last 2 there are some different at matching orders, specifically i modified a bit
target_cr_test_limit_call
to show this differences:This is how before HF match the orders before and after the big sell order:
And this is what after HF will do:
@abitmore i will like to have your word about this when you can.