Skip to content

Commit 2759682

Browse files
committed
Fix comment location
Actually put the comment in the right place i.e. _before_ we start updating our local state! :)
1 parent 1edde0d commit 2759682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6798,15 +6798,15 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
67986798
return Err((self, ChannelError::Close("Failed to validate our commitment".to_owned())));
67996799
}
68006800

6801+
// Now that we're past error-generating stuff, update our local state:
6802+
68016803
self.context.channel_state = ChannelState::FundingSent as u32;
68026804
self.context.channel_id = funding_txo.to_channel_id();
68036805
self.context.cur_counterparty_commitment_transaction_number -= 1;
68046806
self.context.cur_holder_commitment_transaction_number -= 1;
68056807

68066808
let (counterparty_initial_commitment_tx, funding_signed) = self.context.get_funding_signed_msg(logger);
68076809

6808-
// Now that we're past error-generating stuff, update our local state:
6809-
68106810
let funding_redeemscript = self.context.get_funding_redeemscript();
68116811
let funding_txo_script = funding_redeemscript.to_v0_p2wsh();
68126812
let obscure_factor = get_commitment_transaction_number_obscure_factor(&self.context.get_holder_pubkeys().payment_point, &self.context.get_counterparty_pubkeys().payment_point, self.context.is_outbound());

0 commit comments

Comments
 (0)