style: rustfmt the code added in 01-04 and the reconcile fix

The release gate's cargo-fmt stage failed on my own additions — the
tests in message_types.rs and lnd/info.rs and the reconcile branch in
prod_orchestrator.rs were written programmatically and never passed
through rustfmt. Formatting only; rustfmt is semantics-preserving and
the gate re-runs the suites before building.

Caught by the gate rather than in review, which is the gate working. Also
a reminder that a piped command's exit code is the pipe's, not the
script's: the task notification reported success while the log said
CREATE_RELEASE_EXIT=1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-08-03 01:34:23 -04:00
co-authored by Claude Opus 5
parent 41de23e71f
commit b15b160294
3 changed files with 28 additions and 17 deletions
+19 -13
View File
@@ -1024,12 +1024,14 @@ mod tests {
assert_eq!(decoded.height, 890412);
}
const LN_PUBKEY: &str =
"03a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90";
const LN_PUBKEY: &str = "03a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90";
#[test]
fn lightning_info_round_trips_through_u8_label_and_back() {
assert_eq!(MeshMessageType::from_u8(26), Some(MeshMessageType::LightningInfo));
assert_eq!(
MeshMessageType::from_u8(26),
Some(MeshMessageType::LightningInfo)
);
assert_eq!(MeshMessageType::LightningInfo.label(), "lightning_info");
assert_eq!(
MeshMessageType::from_label("lightning_info"),
@@ -1077,10 +1079,14 @@ mod tests {
#[test]
fn valid_lightning_uris_are_accepted() {
assert!(is_valid_lightning_uri(&format!("{LN_PUBKEY}@1.2.3.4:9735")));
assert!(is_valid_lightning_uri(&format!("{LN_PUBKEY}@example.com:9735")));
assert!(is_valid_lightning_uri(&format!(
"{LN_PUBKEY}@example.com:9735"
)));
// The :port suffix is optional.
assert!(is_valid_lightning_uri(&format!("{LN_PUBKEY}@1.2.3.4")));
assert!(is_valid_lightning_uri(&format!("{LN_PUBKEY}@abcdefghij.onion:9735")));
assert!(is_valid_lightning_uri(&format!(
"{LN_PUBKEY}@abcdefghij.onion:9735"
)));
}
#[test]
@@ -1088,16 +1094,16 @@ mod tests {
let bad = [
"".to_string(),
"no-at-sign".to_string(),
LN_PUBKEY.to_string(), // no host at all
format!("{LN_PUBKEY}@"), // empty host
"@1.2.3.4:9735".to_string(), // no pubkey
format!("{}@1.2.3.4:9735", &LN_PUBKEY[..65]), // pubkey too short
LN_PUBKEY.to_string(), // no host at all
format!("{LN_PUBKEY}@"), // empty host
"@1.2.3.4:9735".to_string(), // no pubkey
format!("{}@1.2.3.4:9735", &LN_PUBKEY[..65]), // pubkey too short
format!("{}z@1.2.3.4:9735", &LN_PUBKEY[..65]), // pubkey not hex
format!("{LN_PUBKEY}@1.2.3.4:99999"), // port out of u16 range
format!("{LN_PUBKEY}@1.2.3.4:"), // empty port
format!("{LN_PUBKEY}@1.2.3.4:http"), // non-numeric port
format!("{LN_PUBKEY}@1.2.3.4:99999"), // port out of u16 range
format!("{LN_PUBKEY}@1.2.3.4:"), // empty port
format!("{LN_PUBKEY}@1.2.3.4:http"), // non-numeric port
format!("{LN_PUBKEY}@host with spaces:9735"),
format!("{LN_PUBKEY}@a@b:9735"), // two '@'
format!("{LN_PUBKEY}@a@b:9735"), // two '@'
];
for uri in bad {
assert!(