Skip to content

Commit d8348b7

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 b2ad44e commit d8348b7

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
@@ -6777,15 +6777,15 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
67776777
return Err((self, ChannelError::Close("Failed to validate our commitment".to_owned())));
67786778
}
67796779

6780+
// Now that we're past error-generating stuff, update our local state:
6781+
67806782
self.context.channel_state = ChannelState::FundingSent as u32;
67816783
self.context.channel_id = funding_txo.to_channel_id();
67826784
self.context.cur_counterparty_commitment_transaction_number -= 1;
67836785
self.context.cur_holder_commitment_transaction_number -= 1;
67846786

67856787
let (counterparty_initial_commitment_tx, funding_signed) = self.context.get_funding_signed_msg(logger);
67866788

6787-
// Now that we're past error-generating stuff, update our local state:
6788-
67896789
let funding_redeemscript = self.context.get_funding_redeemscript();
67906790
let funding_txo_script = funding_redeemscript.to_v0_p2wsh();
67916791
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)