Caravan Documentation
    Preparing search index...

    Function validateCPFPPackage

    • Validates that the combined fee rate of a parent and child transaction meets or exceeds the target fee rate for a Child-Pays-for-Parent (CPFP) transaction.

      This function calculates the combined fee rate of the parent transaction (from the analyzer) and its child transaction, then compares it to the target CPFP fee rate. It ensures that the CPFP transaction provides sufficient fee incentive for miners to include both transactions in a block.

      Parameters

      • txAnalyzer: TransactionAnalyzer

        The analyzer containing parent transaction information and CPFP fee rate.

      • childTxTemplate: BtcTransactionTemplate

        The child transaction template.

      • strict: boolean

        If true, throws an error when the fee rate is not satisfied. If false, only logs a warning.

      Returns void

      If the combined fee rate is below the target fee rate in strict mode.