+ match self.send_commitment_no_state_update() {
+ Ok((res, remote_commitment_tx)) => {
+ // Update state now that we've passed all the can-fail calls...
+ self.channel_monitor.provide_latest_remote_commitment_tx_info(&remote_commitment_tx.0, remote_commitment_tx.1, self.cur_remote_commitment_transaction_number);
+ self.channel_state |= ChannelState::AwaitingRemoteRevoke as u32;
+ Ok((res, self.channel_monitor.clone()))
+ },
+ Err(e) => Err(e),
+ }
+ }
+
+ /// Only fails in case of bad keys. Used for channel_reestablish commitment_signed generation
+ /// when we shouldn't change HTLC/channel state.
+ fn send_commitment_no_state_update(&self) -> Result<(msgs::CommitmentSigned, (Transaction, Vec<HTLCOutputInCommitment>)), HandleError> {
+ let funding_script = self.get_funding_redeemscript();
+