From 23da075271fa6ab5a690081d1b79788d9827d15a Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Wed, 24 Jul 2019 12:51:04 -0400 Subject: [PATCH] Move calculation outside lambda to work around Clang optimization bug --- tests/tests/operation_time_tests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tests/operation_time_tests.cpp b/tests/tests/operation_time_tests.cpp index aed87f28b1..f4f5841215 100644 --- a/tests/tests/operation_time_tests.cpp +++ b/tests/tests/operation_time_tests.cpp @@ -2766,11 +2766,13 @@ BOOST_AUTO_TEST_CASE( sbd_stability ) }); }, database::skip_witness_signature ); + auto current_sbd_supply = alice_sbd + asset( ( ( gpo.sbd_start_percent - 9 ) * sbd_balance.amount ) / gpo.sbd_stop_percent, SBD_SYMBOL ) + db->get_account( STEEM_TREASURY_ACCOUNT ).sbd_balance; + db_plugin->debug_update( [=]( database& db ) { db.modify( db.get_dynamic_global_properties(), [&]( dynamic_global_property_object& gpo ) { - gpo.current_sbd_supply = alice_sbd + asset( ( ( gpo.sbd_start_percent - 9 ) * sbd_balance.amount ) / gpo.sbd_stop_percent, SBD_SYMBOL ) + db.get_account( STEEM_TREASURY_ACCOUNT ).sbd_balance; + gpo.current_sbd_supply = current_sbd_supply; }); }, database::skip_witness_signature );