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 @@ -866,6 +866,17 @@ impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
866
866
Self :: do_attempt_write_data ( & mut descriptor, peer) ;
867
867
continue ;
868
868
} ,
869
+ Event :: SendRevokeAndACK { ref node_id, ref msg } => {
870
+ log_trace ! ( self , "Handling SendRevokeAndACK event in peer_handler for node {} for channel {}" ,
871
+ log_pubkey!( node_id) ,
872
+ log_bytes!( msg. channel_id) ) ;
873
+ let ( mut descriptor, peer) = get_peer_for_forwarding ! ( node_id, {
874
+ //TODO: Do whatever we're gonna do for handling dropped messages
875
+ } ) ;
876
+ peer. pending_outbound_buffer . push_back ( peer. channel_encryptor . encrypt_message ( & encode_msg ! ( msg, 133 ) ) ) ;
877
+ Self :: do_attempt_write_data ( & mut descriptor, peer) ;
878
+ continue ;
879
+ } ,
869
880
Event :: SendShutdown { ref node_id, ref msg } => {
870
881
log_trace ! ( self , "Handling Shutdown event in peer_handler for node {} for channel {}" ,
871
882
log_pubkey!( node_id) ,
Original file line number Diff line number Diff line change @@ -129,6 +129,15 @@ pub enum Event {
129
129
/// The update messages which should be sent. ALL messages in the struct should be sent!
130
130
updates : msgs:: CommitmentUpdate ,
131
131
} ,
132
+ /// Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id.
133
+ ///
134
+ /// This event is handled by PeerManager::process_events if you are using a PeerManager.
135
+ SendRevokeAndACK {
136
+ /// The node_id of the node which should receive this message
137
+ node_id : PublicKey ,
138
+ /// The message which should be sent.
139
+ msg : msgs:: RevokeAndACK ,
140
+ } ,
132
141
/// Used to indicate that a shutdown message should be sent to the peer with the given node_id.
133
142
///
134
143
/// 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