priority calculation.
This commit is contained in:
parent
8f3fae329d
commit
533e644284
@ -1865,8 +1865,8 @@ MempoolEntry.fromRaw = function fromRaw(data) {
|
||||
MempoolEntry.prototype.getPriority = function getPriority(height) {
|
||||
var heightDelta = height - this.height;
|
||||
var modSize = this.tx.getModifiedSize(this.size);
|
||||
var deltaPriority = heightDelta * this.chainValue / modSize;
|
||||
var result = this.priority + deltaPriority;
|
||||
var deltaPriority = (heightDelta * this.chainValue) / modSize;
|
||||
var result = this.priority + Math.floor(deltaPriority);
|
||||
if (result < 0)
|
||||
result = 0;
|
||||
return result;
|
||||
|
||||
@ -1450,7 +1450,7 @@ TX.prototype.getPriority = function getPriority(height, size) {
|
||||
|
||||
return {
|
||||
value: value,
|
||||
priority: sum / size
|
||||
priority: Math.floor(sum / size)
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user