CPFP support (#395)
* CPFP support. fixes #5 fixes #353 fixes #360 * Use effectiveFeePerVsize for mempool statistics. * Renaming endpoint cpfp-info to just cpfp. * Renaming decended to BestDescendant. * Updating language file with new strings.
This commit is contained in:
@@ -26,9 +26,11 @@ class TransactionUtils {
|
||||
}
|
||||
|
||||
private extendTransaction(transaction: IEsploraApi.Transaction): TransactionExtended {
|
||||
const feePerVbytes = Math.max(1, (transaction.fee || 0) / (transaction.weight / 4));
|
||||
const transactionExtended: TransactionExtended = Object.assign({
|
||||
vsize: Math.round(transaction.weight / 4),
|
||||
feePerVsize: Math.max(1, (transaction.fee || 0) / (transaction.weight / 4)),
|
||||
feePerVsize: feePerVbytes,
|
||||
effectiveFeePerVsize: feePerVbytes,
|
||||
}, transaction);
|
||||
if (!transaction.status.confirmed) {
|
||||
transactionExtended.firstSeen = Math.round((new Date().getTime() / 1000));
|
||||
|
||||
Reference in New Issue
Block a user