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
Correct error types for outbound splice checking methods
When doing an outbound splice, we check some of the instructions
first in utility methods, then convert errors to `APIError`s. These
utility methods should thus either return an `APIError` or more
generic (string or `()`) error type, but they currently return a
`ChannelError`, which is only approprite when the calling code will
do what the `ChannelError` instructs (including closing the
channel).
Here we fix that by returning `String`s instead.
"Total input amount {total_input_sats} is lower than needed for contribution {contribution_amount}, considering fees of {estimated_fee}. Need more inputs.",
6094
+
))
6096
6095
} else {
6097
6096
Ok(estimated_fee)
6098
6097
}
@@ -16205,8 +16204,8 @@ mod tests {
16205
16204
2000,
16206
16205
);
16207
16206
assert_eq!(
16208
-
format!("{:?}", res.err().unwrap()),
16209
-
"Warn: Total input amount 100000 is lower than needed for contribution 220000, considering fees of 1746. Need more inputs.",
16207
+
res.err().unwrap(),
16208
+
"Total input amount 100000 is lower than needed for contribution 220000, considering fees of 1746. Need more inputs.",
16210
16209
);
16211
16210
}
16212
16211
@@ -16241,8 +16240,8 @@ mod tests {
16241
16240
2200,
16242
16241
);
16243
16242
assert_eq!(
16244
-
format!("{:?}", res.err().unwrap()),
16245
-
"Warn: Total input amount 300000 is lower than needed for contribution 298032, considering fees of 2522. Need more inputs.",
16243
+
res.err().unwrap(),
16244
+
"Total input amount 300000 is lower than needed for contribution 298032, considering fees of 2522. Need more inputs.",
0 commit comments