+ if send_funding_locked.0 {
+ // If a expects a funding_locked, it better not think it has received a revoke_and_ack
+ // from b
+ for reestablish in reestablish_1.iter() {
+ assert_eq!(reestablish.next_remote_commitment_number, 0);
+ }
+ }
+ if send_funding_locked.1 {
+ // If b expects a funding_locked, it better not think it has received a revoke_and_ack
+ // from a
+ for reestablish in reestablish_2.iter() {
+ assert_eq!(reestablish.next_remote_commitment_number, 0);
+ }
+ }
+ if send_funding_locked.0 || send_funding_locked.1 {
+ // If we expect any funding_locked's, both sides better have set
+ // next_local_commitment_number to 1
+ for reestablish in reestablish_1.iter() {
+ assert_eq!(reestablish.next_local_commitment_number, 1);
+ }
+ for reestablish in reestablish_2.iter() {
+ assert_eq!(reestablish.next_local_commitment_number, 1);
+ }
+ }
+