Skip to content

Commit dca1c3c

Browse files
committed
f - simplify error handling
1 parent a64dd9a commit dca1c3c

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,22 +1827,15 @@ where
18271827

18281828
return result;
18291829
} else {
1830+
// Replace the taken state
18301831
pending_splice.funding_negotiation = Some(funding_negotiation);
1831-
return Err(ChannelError::Warn(
1832-
"Got a transaction negotiation message in an invalid state"
1833-
.to_owned(),
1834-
));
18351832
}
1836-
} else {
1837-
return Err(ChannelError::Warn(
1838-
"Got a transaction negotiation message in an invalid state".to_owned(),
1839-
));
18401833
}
1841-
} else {
1842-
return Err(ChannelError::Warn(
1843-
"Got a transaction negotiation message in an invalid state".to_owned(),
1844-
));
18451834
}
1835+
1836+
return Err(ChannelError::Warn(
1837+
"Got a transaction negotiation message in an invalid state".to_owned(),
1838+
));
18461839
},
18471840
_ => {
18481841
return Err(ChannelError::Warn(

0 commit comments

Comments
 (0)