Add fee to Cpfp API

This commit is contained in:
softsimon 2024-07-18 16:44:00 +08:00
parent 0a116804e8
commit cdaf42797f
No known key found for this signature in database
GPG key ID: 488D7DCFB5A430D7
3 changed files with 4 additions and 0 deletions

View file

@ -160,6 +160,7 @@ class BitcoinRoutes {
descendants: tx.descendants || null,
effectiveFeePerVsize: tx.effectiveFeePerVsize || null,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration,
acceleratedBy: tx.acceleratedBy || undefined,

View file

@ -32,6 +32,7 @@ export function calculateCpfp(tx: MempoolTransactionExtended, mempool: { [txid:
descendants: tx.descendants || [],
effectiveFeePerVsize: tx.effectiveFeePerVsize || tx.adjustedFeePerVsize || tx.feePerVsize,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration
};
@ -70,6 +71,7 @@ export function calculateCpfp(tx: MempoolTransactionExtended, mempool: { [txid:
descendants: tx.descendants || [],
effectiveFeePerVsize: tx.effectiveFeePerVsize || tx.adjustedFeePerVsize || tx.feePerVsize,
sigops: tx.sigops,
fee: tx.fee,
adjustedVsize: tx.adjustedVsize,
acceleration: tx.acceleration
};

View file

@ -223,6 +223,7 @@ export interface CpfpInfo {
sigops?: number;
adjustedVsize?: number,
acceleration?: boolean,
fee?: number;
}
export interface TransactionStripped {