Handle coinbase transactions no longer has undefined fee.
This commit is contained in:
@@ -12,7 +12,7 @@ export class Common {
|
||||
return medianNr;
|
||||
}
|
||||
|
||||
static getFeesInRange(transactions: TransactionExtended[], rangeLength: number, lastindex = 0) {
|
||||
static getFeesInRange(transactions: TransactionExtended[], rangeLength: number) {
|
||||
const arr = [transactions[transactions.length - 1].feePerVsize];
|
||||
const chunk = 1 / (rangeLength - 1);
|
||||
let itemsToAdd = rangeLength - 2;
|
||||
@@ -22,7 +22,7 @@ export class Common {
|
||||
itemsToAdd--;
|
||||
}
|
||||
|
||||
arr.push(transactions[lastindex].feePerVsize);
|
||||
arr.push(transactions[0].feePerVsize);
|
||||
return arr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user