File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -869,6 +869,17 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
869
869
Self :: do_attempt_write_data ( & mut descriptor, peer) ;
870
870
continue ;
871
871
} ,
872
+ Event :: SendRevokeAndACK { ref node_id, ref msg } => {
873
+ log_trace ! ( self , "Handling SendRevokeAndACK event in peer_handler for node {} for channel {}" ,
874
+ log_pubkey!( node_id) ,
875
+ log_bytes!( msg. channel_id) ) ;
876
+ let ( mut descriptor, peer) = get_peer_for_forwarding ! ( node_id, {
877
+ //TODO: Do whatever we're gonna do for handling dropped messages
878
+ } ) ;
879
+ peer. pending_outbound_buffer . push_back ( peer. channel_encryptor . encrypt_message ( & encode_msg ! ( msg, 133 ) ) ) ;
880
+ Self :: do_attempt_write_data ( & mut descriptor, peer) ;
881
+ continue ;
882
+ } ,
872
883
Event :: SendShutdown { ref node_id, ref msg } => {
873
884
log_trace ! ( self , "Handling Shutdown event in peer_handler for node {} for channel {}" ,
874
885
log_pubkey!( node_id) ,
Original file line number Diff line number Diff line change @@ -125,6 +125,15 @@ pub enum Event {
125
125
/// The update messages which should be sent. ALL messages in the struct should be sent!
126
126
updates : msgs:: CommitmentUpdate ,
127
127
} ,
128
+ /// Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id.
129
+ ///
130
+ /// This event is handled by PeerManager::process_events if you are using a PeerManager.
131
+ SendRevokeAndACK {
132
+ /// The node_id of the node which should receive this message
133
+ node_id : PublicKey ,
134
+ /// The message which should be sent.
135
+ msg : msgs:: RevokeAndACK ,
136
+ } ,
128
137
/// Used to indicate that a shutdown message should be sent to the peer with the given node_id.
129
138
///
130
139
/// This event is handled by PeerManager::process_events if you are using a PeerManager.
You can’t perform that action at this time.
0 commit comments