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

Closes #2140 - Update SBD Print Rate #2603

Merged
merged 5 commits into from
Jul 20, 2018
Merged

Closes #2140 - Update SBD Print Rate #2603

merged 5 commits into from
Jul 20, 2018

Conversation

mvandeberg
Copy link
Contributor

Internal PR for #2503

Closes #2140

@TimCliff
Copy link
Contributor

TimCliff commented Jul 9, 2018

Just an update - I have started on fixes for the Boost test fixes here:
TimCliff@24fa7e9

After these changes however, it is failing on this:

/usr/local/src/steem/tests/tests/operation_time_tests.cpp(2771): fatal error in "sbd_stability": critical check db->get_account( "alice" ).sbd_balance + db->get_account( "alice" ).reward_sbd_balance == alice_sbd failed

I'm continuing to review.

@TimCliff
Copy link
Contributor

Update: I resolved the failing test in my local branch. The constant in the comment_reward calculation needed to be updated to:

auto comment_reward = ( gpo.total_reward_fund_steem.amount + 85140 ) - ( ( gpo.total_reward_fund_steem.amount + 85140 ) * 25 * STEEM_1_PERCENT ) / STEEM_100_PERCENT ;

I am now working on the next failing test:
critical check db->get_dynamic_global_properties().sbd_print_rate < 10000 failed

@TimCliff
Copy link
Contributor

I have this fixed on a local branch: https://github.com/TimCliff/steem/tree/2140-fix-boost-tests. I am just running some final tests before submitting a PR.

@theoreticalbts
Copy link
Contributor

-      while( ( db->get_dynamic_global_properties().current_sbd_supply * exchange_rate ).amount >= ( db->get_dynamic_global_properties().virtual_supply.amount * STEEM_SBD_START_PERCENT ) / STEEM_100_PERCENT )
+      while( ( gpo.current_sbd_supply * exchange_rate ).amount >= ( gpo.virtual_supply.amount * gpo.sbd_start_percent ) / STEEM_100_PERCENT )

Blocks are produced inside this loop, which means you can't assume pointers to database objects (such as GPO) remain valid.

@TimCliff
Copy link
Contributor

@theoreticalbts does adding back auto& gpo = db->get_dynamic_global_properties(); inside the loop resolve this?

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.

None yet

3 participants