diff --git a/processor/bitcoin/src/scheduler.rs b/processor/bitcoin/src/scheduler.rs index e225613c..7f365c56 100644 --- a/processor/bitcoin/src/scheduler.rs +++ b/processor/bitcoin/src/scheduler.rs @@ -59,10 +59,22 @@ fn signable_transaction( }) }) .collect::>(); + /* + Push a payment to a key with a known private key which anyone can spend. If this transaction + gets stuck, this lets anyone create a child transaction spending this output, raising the fee, + getting the transaction unstuck (via CPFP). + */ + payments.push(Payment::new( + // The generator is even so this is valid + Address::new(p2tr_script_buf(::G::GENERATOR)), + // This uses the minimum output value allowed, as defined as a constant in bitcoin-serai + Balance { coin: Coin::Bitcoin, amount: Amount(bitcoin_serai::wallet::DUST) }, + None, + )); + let change = change .map(, EffectedReceivedOutputs>>>::change_address); - // TODO: ACP output BSignableTransaction::new( inputs.clone(), &payments