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

Issue: Early withdrawal claims #23

Conversation

TheTaconator
Copy link
Contributor

Fix of bug that permits withdrawal claims before the first withdrawal period

@abitmore
Copy link
Member

abitmore commented Dec 31, 2016

This fix requires a hard fork.

//Edit: to avoid unintended forking, the added check should be surrounded with a hard fork check. See https://github.com/cryptonomex/graphene/pull/617/files for example.

@TheTaconator
Copy link
Contributor Author

Thank you for the example case. The fix and tests have been updated to consider a new fork time. The fork time has been set to February 1, 2017.

@abitmore
Copy link
Member

abitmore commented Jan 2, 2017

@vikramrajkumar please review.

@vikramrajkumar vikramrajkumar changed the base branch from bitshares to master January 31, 2017 20:03
@@ -1018,7 +1018,7 @@ market_ticker database_api_impl::get_ticker( const string& base, const string& q
result.lowest_ask = 0;
result.highest_bid = 0;

auto price_to_real = [&]( const share_type a, int p ) { return double( a.value ) / pow( 10, p ); };
// auto price_to_real = [&]( const share_type a, int p ) { return double( a.value ) / pow( 10, p ); };
Copy link
Contributor

Choose a reason for hiding this comment

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

This change looks unrelated to the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is correct. I noticed that it was an unused variable. Do you prefer that I remove it from the commit?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please rebase on develop and see if this change remains. In that case I'd be OK with it, but instead of commenting out the line just remove it completely.

* @param current_time Current time
* @return A description of the current period
*/
withdrawal_period_descriptor current_period(fc::time_point_sec current_time) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICS the withdrawal_period_descriptor and this method are only used in unit tests. IMO they shouldn't become part of the main code in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point, although I have this object being used for code (that is not yet committed) which is related to informing a user/client software about what can still be withdrawn during any particular period.

Do you suggest that I:
(1) temporarily move this code out of the main code, and then later
(2) move this class into the main code when committing my future code?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please.

@oxarbitrage oxarbitrage added this to the Hardfork - Bugs milestone Aug 13, 2017
oxarbitrage and others added 8 commits August 14, 2017 08:19
* new pull for issue 298

* Revert "finish sentence in readme"

This reverts commit bf76c59.

* Revert "Add api-access console log to node startup when present"

This reverts commit 80d81ac.

* add support for start=0

* changes to rvalues

* Update application.cpp

* Update application.cpp

* Update application.cpp

* Update README.md
Fix bitshares#367 - use unique options list for parsing config file
@pmconrad
Copy link
Contributor

@TheTaconator do you think you can add the requested modifications within the next couple of days?

database api changes in witnesses, committee members and workers calls.
instead of <= 100 in get_full_accounts.
@abitmore
Copy link
Member

Also "this branch has conflicts that must be resolved". Need to rebase.

change distance() in get_full_accounts to size()
@TheTaconator
Copy link
Contributor Author

@pmconrad apologies, but due to some other deadlines I will not be able to make the changes in time. I might need another 7 days. I have no objections about proceeding without this fix for now.

@pmconrad
Copy link
Contributor

Closing here, continued in #386

@pmconrad pmconrad closed this Aug 31, 2017
@TheTaconator TheTaconator deleted the fix_withdrawal_claim_too_early branch September 8, 2017 13:56
@abitmore abitmore modified the milestones: Hardfork - Bugs , Hardfork - 201711 - BSIP 018 and etc Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants