You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check_closed_event!(nodes[1],1,ClosureReason::ProcessingError{ err:"Peer attempted to reestablish channel with a very old local commitment transaction".to_string()});
7385
-
assert_eq!(check_closed_broadcast!(nodes[1],true).unwrap().data,"Peer attempted to reestablish channel with a very old local commitment transaction");
7386
-
check_added_monitors!(nodes[1],1);
7383
+
// Check if we sent the warning message when we detecting that A is fallen-behind,
7384
+
// and we give the possibility to A to be able to recover from error.
7385
+
for msg in nodes[1].node.get_and_clear_pending_msg_events(){
assert!(msg.data.contains(&"Peer attempted to reestablish channel with a very old local commitment transaction".to_owned()));
7390
+
},
7391
+
_ => panic!("Unexpected event!"),
7392
+
}
7393
+
}else{
7394
+
panic!("Unexpected event")
7395
+
}
7396
+
}
7387
7397
7388
-
// Check A is able to claim to_remote output
7389
-
let node_txn = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().clone();
7390
-
assert_eq!(node_txn.len(),1);
7391
-
check_spends!(node_txn[0], chan.3);
7392
-
assert_eq!(node_txn[0].output.len(),2);
7393
-
mine_transaction(&nodes[0],&node_txn[0]);
7394
-
connect_blocks(&nodes[0],ANTI_REORG_DELAY - 1);
7395
-
check_closed_event!(nodes[0],1,ClosureReason::ProcessingError{ err:"We have fallen behind - we have received proof that if we broadcast remote is going to claim our funds - we can\'t do any automated broadcasting".to_string()});
7396
-
let spend_txn = check_spendable_outputs!(nodes[0], node_cfgs[0].keys_manager);
7397
-
assert_eq!(spend_txn.len(),1);
7398
-
check_spends!(spend_txn[0], node_txn[0]);
7398
+
// Clear the event received by the node A, the failure need to be handled by the API user.
0 commit comments