]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #36 from TheBlueMatt/2018-08-33-cleanups
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Fri, 29 Jun 2018 22:26:25 +0000 (18:26 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Jun 2018 22:26:25 +0000 (18:26 -0400)
Cleanups after #33, plus one unrelated bugfix spotted in #33 review

1  2 
src/ln/channel.rs

index 1c17cb1f9c1f18613a7fe1625119a9c4a91a26ba,37d435cefc1a2ca4336ae0e23376a01f545a0c73..dea03bd41c274dd3e0e360e4841d9bc660003371
@@@ -1164,9 -1164,8 +1164,8 @@@ impl Channel 
  
                // Now that we're past error-generating stuff, update our local state:
  
 -              self.channel_monitor.provide_latest_remote_commitment_tx_info(&remote_initial_commitment_tx, Vec::new());
 +              self.channel_monitor.provide_latest_remote_commitment_tx_info(&remote_initial_commitment_tx, Vec::new(), self.cur_remote_commitment_transaction_number);
                self.channel_state = ChannelState::FundingSent as u32;
-               let funding_txo = self.channel_monitor.get_funding_txo().unwrap();
                self.channel_id = funding_txo.to_channel_id();
                self.cur_remote_commitment_transaction_number -= 1;
                self.cur_local_commitment_transaction_number -= 1;
                let temporary_channel_id = self.channel_id;
  
                // Now that we're past error-generating stuff, update our local state:
 -              self.channel_monitor.provide_latest_remote_commitment_tx_info(&commitment_tx, Vec::new());
 +              self.channel_monitor.provide_latest_remote_commitment_tx_info(&commitment_tx, Vec::new(), self.cur_remote_commitment_transaction_number);
                self.channel_state = ChannelState::FundingCreated as u32;
-               let funding_txo = self.channel_monitor.get_funding_txo().unwrap();
                self.channel_id = funding_txo.to_channel_id();
                self.cur_remote_commitment_transaction_number -= 1;