Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Review comment: Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vihu committed Nov 16, 2020
1 parent 11ad15a commit 5f87842
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/transactions/v1/blockchain_txn_rewards_v1.erl
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ poc_witnesses_rewards(Transactions,
[] ->
Acc1;
ValidWitnesses ->
%% We found some valid witnesses, we only apply the witness_redundancy and decay_rate if BOTH
%% are set as chain variables, otherwise we default to the old behavior and set ToAdd=1
%%
%% If both witness_redundancy and decay_rate are set, we calculate a scaled rx unit (the value ToAdd)
%% This is determined using the formulae mentioned in hip15
ToAdd = case {WitnessRedundancy, DecayRate} of
{undefined, _} -> 1;
{_, undefined} -> 1;
Expand Down

0 comments on commit 5f87842

Please sign in to comment.