File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,16 +93,11 @@ def sbd_to_rshares(self, sbd_payout):
9393 """
9494 steem_payout = self .sbd_to_steem (sbd_payout )
9595
96- props = self .steemd .get_dynamic_global_properties ()
97- total_reward_fund_steem = Amount (props ['total_reward_fund_steem' ])
98- total_reward_shares2 = int (props ['total_reward_shares2' ])
99-
100- post_rshares2 = (
101- steem_payout / total_reward_fund_steem ) * total_reward_shares2
96+ reward_fund = self .steemd .get_reward_fund ()
97+ reward_balance = Amount (reward_fund ['reward_balance' ]).amount
98+ recent_claims = int (reward_fund ['recent_claims' ])
10299
103- rshares = math .sqrt (
104- self .CONTENT_CONSTANT ** 2 + post_rshares2 ) - self .CONTENT_CONSTANT
105- return rshares
100+ return int (recent_claims * steem_payout / (reward_balance - steem_payout ))
106101
107102 def rshares_2_weight (self , rshares ):
108103 """ Obtain weight from rshares
You can’t perform that action at this time.
0 commit comments