Skip to content

Commit

Permalink
Merge pull request steemit#3319 from steemit/3263-PR
Browse files Browse the repository at this point in the history
Closes steemit#3258 Fix update_median_feed when total sbd is 0
  • Loading branch information
Michael Vandeberg authored May 21, 2019
2 parents dc983c5 + 7f39f0c commit d72b83c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3397,10 +3397,14 @@ try {
// so the combined market cap is $900 + $100 = $1000.

const auto& gpo = get_dynamic_global_properties();
price min_price( asset( 9 * gpo.current_sbd_supply.amount, SBD_SYMBOL ), gpo.current_supply );

if( min_price > fho.current_median_history )
fho.current_median_history = min_price;
if( gpo.current_sbd_supply.amount > 0 )
{
price min_price( asset( 9 * gpo.current_sbd_supply.amount, SBD_SYMBOL ), gpo.current_supply );

if( min_price > fho.current_median_history )
fho.current_median_history = min_price;
}
}
}
});
Expand Down

0 comments on commit d72b83c

Please sign in to comment.