match $thing {
Ok(x) => x,
Err(e) => {
- // TODO: Log e.err
+ println!("Got error handling message: {}!", e.err);
if let Some(action) = e.msg {
match action {
msgs::ErrorAction::UpdateFailHTLC { msg } => {
encode_and_send_msg!(msg, 131);
continue;
},
- msgs::ErrorAction::DisconnectPeer {} => {
+ msgs::ErrorAction::DisconnectPeer => {
return Err(PeerHandleError{ no_connection_possible: false });
},
+ msgs::ErrorAction::IgnoreError => {
+ continue;
+ },
}
} else {
return Err(PeerHandleError{ no_connection_possible: false });
match $thing {
Ok(x) => x,
Err(_e) => {
+ println!("Error decoding message");
//TODO: Handle e?
return Err(PeerHandleError{ no_connection_possible: false });
}