-
Notifications
You must be signed in to change notification settings - Fork 646
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
Clean up hardfork code #1718
Clean up hardfork code #1718
Conversation
Note: we may probably need to keep some of those in testnet branch. |
I started testing by running snapshots against testnet. It was a while ago (mid-march). I will test again. If the snapshot comes out equal, is there something else that must be considered? |
Please remove the TODO here:
or perhaps better replace it with a comment explaining why. I don't remember if there is another comment (or more) that need to be corrected. I think this code can be removed: bitshares-core/libraries/chain/market_evaluator.cpp Lines 164 to 167 in 0a9d223
I don't remember anything else.. |
|
chain_test failed in travis |
I am working on the issues found, and re-running the snapshot comparisons on testnet and mainnet. I will reply here when those modifications and tests are complete. Note: the commit |
chain_test still failing |
I believe I have handled all the previously found issues with this PR. Please review. Re-ran snapshots for testnet and mainnet with no differences. |
if( next_maintenance_time <= HARDFORK_CORE_834_TIME ) | ||
FC_ASSERT( !o.extensions.value.target_collateral_ratio.valid(), | ||
"Can not set target_collateral_ratio in call_order_update_operation before hardfork 834." ); | ||
|
||
_paying_account = &o.funding_account(d); | ||
_debt_asset = &o.delta_debt.asset_id(d); | ||
FC_ASSERT( _debt_asset->is_market_issued(), "Unable to cover ${sym} as it is not a collateralized asset.", |
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.
Please update the comment in lines 172-176.
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.
Updated comment about softfork 1465 as part of #1743
Update more work needed on this one.
@@ -641,25 +641,16 @@ int database::match( const limit_order_object& bid, const call_order_object& ask | |||
// TODO remove when we're sure it's always false |
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.
Please update this comment to indicate why we're sure it's not always false.
@@ -56,21 +56,9 @@ struct proposal_operation_hardfork_visitor | |||
|| (v.delta_debt.asset_id( db ).bitasset_data_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.
Please replace the TODO comment in line 51
if (block_time < HARDFORK_CORE_188_TIME) { | ||
FC_ASSERT(false, "Not allowed until hardfork 188"); | ||
} | ||
} | ||
// hf_588 | ||
// issue #588 | ||
// |
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.
Please update the rest of this comment to indicate why this can't be moved into asset_settle_cancel_operation::validate
as suggested.
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.
The HARDFORK_CORE_1468
checks should be removed as well I think.
As discussed on telegram we'll merge what we have for the upcoming release and create another cleanup PR later that will address the remaining comments. |
Fixes #1553
There are some hardfork dates that have long passed, and the alternate logic never was used. This PR removes those unnecessary sections.
All hardfork code prior to v3.0.0 was reviewed. The code that remains is believed to be necessary, and was untouched.
Snapshots were done on testnet and mainnet to assure that the results are the same.