@@ -2200,10 +2200,7 @@ where
22002200 ) ) ;
22012201 }
22022202 ChannelState :: NegotiatingFunding ( _) => {
2203- debug ! (
2204- "Beginning processing tx collaboration command, and transitioning from {:?} to CollaboratingFundingTx state" ,
2205- state. state
2206- ) ;
2203+ debug ! ( "Beginning processing tx collaboration command, and transitioning from {:?} to CollaboratingFundingTx state" , state. state) ;
22072204 state. state =
22082205 ChannelState :: CollaboratingFundingTx ( CollaboratingFundingTxFlags :: empty ( ) ) ;
22092206 CollaboratingFundingTxFlags :: empty ( )
@@ -2294,10 +2291,7 @@ where
22942291 state. funding_tx = Some ( tx) ;
22952292 state. update_state ( ChannelState :: AwaitingTxSignatures ( flags) ) ;
22962293 } else {
2297- error ! (
2298- "Invalid state. Expect channel state to be AwaitingTxSignatures, but bot {:?}" ,
2299- state. state
2300- ) ;
2294+ error ! ( "Invalid state. Expect channel state to be AwaitingTxSignatures, but bot {:?}" , state. state) ;
23012295 }
23022296 Ok ( ( ) )
23032297 }
@@ -3933,6 +3927,7 @@ impl ChannelActorState {
39333927 fn on_peer_reconnected ( & mut self ) {
39343928 if self . reestablishing {
39353929 self . connectivity_state = ChannelConnectivityState :: Syncing ;
3930+ self . send_reestablish_message ( ) ;
39363931 }
39373932 }
39383933
@@ -4857,10 +4852,8 @@ impl ChannelActorState {
48574852 self . to_local_amount = to_local_amount;
48584853 self . to_remote_amount = to_remote_amount;
48594854
4860- debug ! (
4861- "Updated local balance to {} and remote balance to {} by removing tlc {:?} with reason {:?}" ,
4862- to_local_amount, to_remote_amount, tlc_id, reason
4863- ) ;
4855+ debug ! ( "Updated local balance to {} and remote balance to {} by removing tlc {:?} with reason {:?}" ,
4856+ to_local_amount, to_remote_amount, tlc_id, reason) ;
48644857 self . apply_remove_tlc ( tlc_id) ;
48654858 }
48664859 debug ! (
@@ -5626,9 +5619,7 @@ impl ChannelActorState {
56265619 debug ! ( "We have sent our shutdown signature, waiting for counterparty's signature" ) ;
56275620 }
56285621 } else {
5629- debug ! (
5630- "Not ready to shutdown the channel, waiting for both parties to send the Shutdown message"
5631- ) ;
5622+ debug ! ( "Not ready to shutdown the channel, waiting for both parties to send the Shutdown message" ) ;
56325623 }
56335624
56345625 Ok ( ( ) )
@@ -5681,8 +5672,7 @@ impl ChannelActorState {
56815672 _ => {
56825673 return Err ( ProcessingChannelError :: InvalidParameter ( format ! (
56835674 "Must/Mustn't send announcement nonce if channel is public/private, nonce {:?}, channel is public: {}" ,
5684- & accept_channel. channel_announcement_nonce,
5685- self . is_public( )
5675+ & accept_channel. channel_announcement_nonce, self . is_public( )
56865676 ) ) ) ;
56875677 }
56885678 }
@@ -5719,10 +5709,7 @@ impl ChannelActorState {
57195709 ) ) ;
57205710 }
57215711 ChannelState :: NegotiatingFunding ( _) => {
5722- debug ! (
5723- "Started negotiating funding tx collaboration, and transitioning from {:?} to CollaboratingFundingTx state" ,
5724- self . state
5725- ) ;
5712+ debug ! ( "Started negotiating funding tx collaboration, and transitioning from {:?} to CollaboratingFundingTx state" , self . state) ;
57265713 self . state =
57275714 ChannelState :: CollaboratingFundingTx ( CollaboratingFundingTxFlags :: empty ( ) ) ;
57285715 CollaboratingFundingTxFlags :: empty ( )
@@ -5925,9 +5912,7 @@ impl ChannelActorState {
59255912 flags : SigningCommitmentFlags ,
59265913 ) -> ProcessingChannelResult {
59275914 if flags. contains ( SigningCommitmentFlags :: COMMITMENT_SIGNED_SENT ) {
5928- debug ! (
5929- "Commitment signed message sent by both sides, transitioning to AwaitingTxSignatures state"
5930- ) ;
5915+ debug ! ( "Commitment signed message sent by both sides, transitioning to AwaitingTxSignatures state" ) ;
59315916 self . update_state ( ChannelState :: AwaitingTxSignatures (
59325917 AwaitingTxSignaturesFlags :: empty ( ) ,
59335918 ) ) ;
@@ -6719,10 +6704,8 @@ impl ChannelActorState {
67196704 "udt_amount: {}, to_remote_amount: {}, to_local_amount: {}" ,
67206705 udt_amount, self . to_remote_amount, self . to_local_amount
67216706 ) ;
6722- debug ! (
6723- "current_capacity: {}, remote_reserved_ckb_amount: {}, local_reserved_ckb_amount: {}" ,
6724- current_capacity, self . remote_reserved_ckb_amount, self . local_reserved_ckb_amount
6725- ) ;
6707+ debug ! ( "current_capacity: {}, remote_reserved_ckb_amount: {}, local_reserved_ckb_amount: {}" ,
6708+ current_capacity, self . remote_reserved_ckb_amount, self . local_reserved_ckb_amount) ;
67266709 let is_udt_amount_ok = udt_amount == self . get_liquid_capacity ( ) ;
67276710 return Ok ( is_udt_amount_ok) ;
67286711 } else {
@@ -7014,10 +6997,8 @@ impl ChannelActorState {
70146997 } else {
70156998 debug ! (
70166999 "Final balance partition before shutting down: local {} (fee {}), remote {} (fee {})" ,
7017- self . to_local_amount,
7018- local_shutdown_fee,
7019- self . to_remote_amount,
7020- remote_shutdown_fee
7000+ self . to_local_amount, local_shutdown_fee,
7001+ self . to_remote_amount, remote_shutdown_fee
70217002 ) ;
70227003 let local_value =
70237004 self . to_local_amount as u64 + self . local_reserved_ckb_amount - local_shutdown_fee;
0 commit comments