Skip to content
Snippets Groups Projects
Commit d973c2d1 authored by Tim's avatar Tim
Browse files

increase dust threshold for net_rshares_adj, add comment

parent ee962136
No related branches found
No related tags found
No related merge requests found
...@@ -72,8 +72,8 @@ export function contentStats(content) { ...@@ -72,8 +72,8 @@ export function contentStats(content) {
// For graying: sum up total rshares from voters with non-neg reputation. // For graying: sum up total rshares from voters with non-neg reputation.
if(String(v.get('reputation')).substring(0, 1) !== '-') { if(String(v.get('reputation')).substring(0, 1) !== '-') {
// And also ignore tiny downvotes // And also ignore tiny downvotes (9 digits or less)
if(! (rshares.substring(0, 1) === '-' && rshares.length < 10)) { if(! (rshares.substring(0, 1) === '-' && rshares.length < 11)) {
net_rshares_adj = net_rshares_adj.add(rshares) net_rshares_adj = net_rshares_adj.add(rshares)
} }
} }
...@@ -83,7 +83,7 @@ export function contentStats(content) { ...@@ -83,7 +83,7 @@ export function contentStats(content) {
// creates a cheap log10, stake-based flag weight. 1 = approx $400 of downvoting stake; 2 = $4,000; etc // creates a cheap log10, stake-based flag weight. 1 = approx $400 of downvoting stake; 2 = $4,000; etc
const flagWeight = Math.max(String(neg_rshares.div(2)).length - 11, 0) const flagWeight = Math.max(String(neg_rshares.div(2)).length - 11, 0)
// post must have non-trivial negative rshares to be grayed out. // post must have non-trivial negative rshares to be grayed out. (more than 10 digits)
const grayThreshold = -9999999999 const grayThreshold = -9999999999
const net_rshares = Long.fromString(String(content.get('net_rshares'))) const net_rshares = Long.fromString(String(content.get('net_rshares')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment