- let remote_payment_script = Builder::new().push_opcode(opcodes::all::OP_PUSHBYTES_0).push_slice(&payment_key_hash[..]).into_script();
-
- let remote_tx_cache = RemoteCommitmentTransaction { remote_delayed_payment_base_key: *remote_delayed_payment_base_key, remote_htlc_base_key: *remote_htlc_base_key, on_remote_tx_csv, per_htlc: HashMap::new() };
-
- let mut onchain_tx_handler = OnchainTxHandler::new(destination_script.clone(), keys.clone(), on_local_tx_csv);
-
- let local_tx_sequence = initial_local_commitment_tx.unsigned_tx.input[0].sequence as u64;
- let local_tx_locktime = initial_local_commitment_tx.unsigned_tx.lock_time as u64;
- let local_commitment_tx = LocalSignedTx {
- txid: initial_local_commitment_tx.txid(),
- revocation_key: initial_local_commitment_tx.local_keys.revocation_key,
- a_htlc_key: initial_local_commitment_tx.local_keys.a_htlc_key,
- b_htlc_key: initial_local_commitment_tx.local_keys.b_htlc_key,
- delayed_payment_key: initial_local_commitment_tx.local_keys.a_delayed_payment_key,
- per_commitment_point: initial_local_commitment_tx.local_keys.per_commitment_point,
- feerate_per_kw: initial_local_commitment_tx.feerate_per_kw,
+ let counterparty_payment_script = Builder::new().push_opcode(opcodes::all::OP_PUSHBYTES_0).push_slice(&payment_key_hash[..]).into_script();
+
+ let counterparty_tx_cache = CounterpartyCommitmentTransaction { counterparty_delayed_payment_base_key: *counterparty_delayed_payment_base_key, counterparty_htlc_base_key: *counterparty_htlc_base_key, on_counterparty_tx_csv, per_htlc: HashMap::new() };
+
+ let mut onchain_tx_handler = OnchainTxHandler::new(destination_script.clone(), keys.clone(), on_holder_tx_csv);
+
+ let holder_tx_sequence = initial_holder_commitment_tx.unsigned_tx.input[0].sequence as u64;
+ let holder_tx_locktime = initial_holder_commitment_tx.unsigned_tx.lock_time as u64;
+ let holder_commitment_tx = HolderSignedTx {
+ txid: initial_holder_commitment_tx.txid(),
+ revocation_key: initial_holder_commitment_tx.keys.revocation_key,
+ a_htlc_key: initial_holder_commitment_tx.keys.broadcaster_htlc_key,
+ b_htlc_key: initial_holder_commitment_tx.keys.countersignatory_htlc_key,
+ delayed_payment_key: initial_holder_commitment_tx.keys.broadcaster_delayed_payment_key,
+ per_commitment_point: initial_holder_commitment_tx.keys.per_commitment_point,
+ feerate_per_kw: initial_holder_commitment_tx.feerate_per_kw,