- key_storage: self.key_storage.clone(),
- delayed_payment_base_key: self.delayed_payment_base_key.clone(),
- their_htlc_base_key: self.their_htlc_base_key.clone(),
- their_delayed_payment_base_key: self.their_delayed_payment_base_key.clone(),
- their_cur_revocation_points: self.their_cur_revocation_points.clone(),
-
- our_to_self_delay: self.our_to_self_delay,
- their_to_self_delay: self.their_to_self_delay,
-
- old_secrets: self.old_secrets.clone(),
- remote_claimable_outpoints: self.remote_claimable_outpoints.clone(),
- remote_commitment_txn_on_chain: Mutex::new((*self.remote_commitment_txn_on_chain.lock().unwrap()).clone()),
- remote_hash_commitment_number: self.remote_hash_commitment_number.clone(),
-
- prev_local_signed_commitment_tx: self.prev_local_signed_commitment_tx.clone(),
- current_local_signed_commitment_tx: self.current_local_signed_commitment_tx.clone(),
-
- payment_preimages: self.payment_preimages.clone(),
-
- destination_script: self.destination_script.clone(),
- secp_ctx: self.secp_ctx.clone(),
- }
- }
+ // We simply modify last_block_hash in Channel's block_connected so that serialization is
+ // consistent but hopefully the users' copy handles block_connected in a consistent way.
+ // (we do *not*, however, update them in insert_combine to ensure any local user copies keep
+ // their last_block_hash from its state and not based on updated copies that didn't run through
+ // the full block_connected).
+ pub(crate) last_block_hash: Sha256dHash,
+ secp_ctx: Secp256k1<secp256k1::All>, //TODO: dedup this a bit...
+ logger: Arc<Logger>,