From 2fccaf041090e776e16c8ce1207c4db2b67ddc58 Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:21:36 -0700 Subject: [PATCH] rngit: git-remote-rns waits for a path of its own, as upstream's client does --- crates/rns-git/src/bin/git-remote-rns.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/rns-git/src/bin/git-remote-rns.rs b/crates/rns-git/src/bin/git-remote-rns.rs index e2bfb04..6c22322 100644 --- a/crates/rns-git/src/bin/git-remote-rns.rs +++ b/crates/rns-git/src/bin/git-remote-rns.rs @@ -125,11 +125,11 @@ fn abort( }) } -/// Whether the path is known and its announce has reached this process. -/// A shared-instance client's `has_path` reads the daemon's path table, so the -/// identity can arrive just after the path shows up there. +/// Whether this process's own path table has the path and its identity is +/// known, as `RNS.Transport.has_path` in `client.py`. Known destinations loaded +/// over RPC give the identity before any path of our own. async fn path_ready(handle: &ReticulumHandle, hash: [u8; 16]) -> bool { - handle.has_path(hash).await.unwrap_or(false) + rns_tools::has_local_path(handle, hash).await && matches!(handle.recall_without_use(hash).await, Ok(Some(_))) } @@ -149,7 +149,7 @@ async fn await_path(handle: &ReticulumHandle, hash: [u8; 16]) -> bool { } tokio::time::sleep(Duration::from_millis(50)).await; } - handle.has_path(hash).await.unwrap_or(false) + rns_tools::has_local_path(handle, hash).await } fn init_logging(configdir: &Path, rnsconfig: Option<&str>, level: Option) {