Skip to content

Commit

Permalink
Fix Priority Fee Transactions being treated as Free (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
f27d authored and erikzhang committed Aug 24, 2018
1 parent a25d686 commit 095e89f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimplePolicy/SimplePolicyPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public IEnumerable<Transaction> Filter(IEnumerable<Transaction> transactions)
Transaction[] array = transactions.ToArray();
if (array.Length + 1 <= Settings.Default.MaxTransactionsPerBlock)
return array;
transactions = array.OrderByDescending(p => p.NetworkFee / p.Size).Take(Settings.Default.MaxTransactionsPerBlock - 1);
transactions = array.OrderByDescending(p => p.NetworkFee / p.Size).ThenByDescending(p => p.NetworkFee).Take(Settings.Default.MaxTransactionsPerBlock - 1);
return FilterFree(transactions);
}

Expand Down

0 comments on commit 095e89f

Please sign in to comment.