miner: improve rate comparison.
This commit is contained in:
parent
321b3f5acc
commit
e577228944
@ -634,7 +634,16 @@ function cmpPriority(a, b) {
|
||||
}
|
||||
|
||||
function cmpRate(a, b) {
|
||||
return b.descRate - a.descRate;
|
||||
var x = a.rate;
|
||||
var y = b.rate;
|
||||
|
||||
if (a.descRate > a.rate)
|
||||
x = a.descRate;
|
||||
|
||||
if (b.descRate > b.rate)
|
||||
y = b.descRate;
|
||||
|
||||
return y - x;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user