From 1ab596952ecb54289b0ee2ce2f81845246643783 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Thu, 5 Apr 2018 15:58:55 +0200 Subject: [PATCH] Rake calculation fix as outlined by Dan Notestein --- libraries/chain/tournament_object.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/chain/tournament_object.cpp b/libraries/chain/tournament_object.cpp index 86049b81..c49d9174 100644 --- a/libraries/chain/tournament_object.cpp +++ b/libraries/chain/tournament_object.cpp @@ -311,10 +311,8 @@ namespace graphene { namespace chain { const account_id_type& winner = *event.match.match_winners.begin(); uint16_t rake_fee_percentage = event.db.get_global_properties().parameters.rake_fee_percentage; - // check whether the core asset pays dividends. If so, we transfer the rake fee - // to the core asset's dividend account - const asset_object& core_asset_obj = asset_id_type()(event.db); - optional dividend_id = core_asset_obj.dividend_data_id; + const asset_object & asset_obj = asset_id_type(0)(event.db); + optional dividend_id = asset_obj.dividend_data_id; share_type rake_amount = 0; if (dividend_id)