@@ -3,7 +3,7 @@ use secp256k1::{Secp256k1,Message};
3
3
4
4
use bitcoin:: util:: hash:: Sha256dHash ;
5
5
6
- use ln:: msgs:: { HandleError , RoutingMessageHandler , MsgEncodable , NetAddress , GlobalFeatures } ;
6
+ use ln:: msgs:: { ErrorAction , HandleError , RoutingMessageHandler , MsgEncodable , NetAddress , GlobalFeatures } ;
7
7
use ln:: msgs;
8
8
9
9
use std:: cmp;
@@ -122,10 +122,10 @@ impl RoutingMessageHandler for Router {
122
122
123
123
let mut network = self . network_map . write ( ) . unwrap ( ) ;
124
124
match network. nodes . get_mut ( & msg. contents . node_id ) {
125
- None => Err ( HandleError { err : "No existing channels for node_announcement" , msg : None } ) ,
125
+ None => Err ( HandleError { err : "No existing channels for node_announcement" , msg : Some ( ErrorAction :: IgnoreError ) } ) ,
126
126
Some ( node) => {
127
127
if node. last_update >= msg. contents . timestamp {
128
- return Err ( HandleError { err : "Update older than last processed update" , msg : None } ) ;
128
+ return Err ( HandleError { err : "Update older than last processed update" , msg : Some ( ErrorAction :: IgnoreError ) } ) ;
129
129
}
130
130
131
131
node. features = msg. contents . features . clone ( ) ;
@@ -159,7 +159,7 @@ impl RoutingMessageHandler for Router {
159
159
//TODO: because asking the blockchain if short_channel_id is valid is only optional
160
160
//in the blockchain API, we need to handle it smartly here, though its unclear
161
161
//exactly how...
162
- return Err ( HandleError { err : "Already have knowledge of channel" , msg : None } )
162
+ return Err ( HandleError { err : "Already have knowledge of channel" , msg : Some ( ErrorAction :: IgnoreError ) } )
163
163
} ,
164
164
Entry :: Vacant ( entry) => {
165
165
entry. insert ( ChannelInfo {
@@ -233,12 +233,12 @@ impl RoutingMessageHandler for Router {
233
233
let chan_was_enabled;
234
234
235
235
match network. channels . get_mut ( & NetworkMap :: get_key ( msg. contents . short_channel_id , msg. contents . chain_hash ) ) {
236
- None => return Err ( HandleError { err : "Couldn't find channel for update" , msg : None } ) ,
236
+ None => return Err ( HandleError { err : "Couldn't find channel for update" , msg : Some ( ErrorAction :: IgnoreError ) } ) ,
237
237
Some ( channel) => {
238
238
macro_rules! maybe_update_channel_info {
239
239
( $target: expr) => {
240
240
if $target. last_update >= msg. contents. timestamp {
241
- return Err ( HandleError { err: "Update older than last processed update" , msg: None } ) ;
241
+ return Err ( HandleError { err: "Update older than last processed update" , msg: Some ( ErrorAction :: IgnoreError ) } ) ;
242
242
}
243
243
chan_was_enabled = $target. enabled;
244
244
$target. last_update = msg. contents. timestamp;
0 commit comments