Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
protocol/service: defensive storage.contains check
✗ CI failure Fintan Halpenny committed 4 months ago
commit b611503d09a8ee7f8fa186986cebf57a2d638139
parent 352c29c23ce2560750369aa50bc9f43bf3019d3f
1 failed (1 total) View logs
1 file changed +10 -2
modified crates/radicle-protocol/src/service.rs
@@ -2530,8 +2530,16 @@ where
            if !policy.is_allow() {
                continue;
            }
-
            if self.storage.contains(&rid)? {
-
                continue;
+
            match self.storage.contains(&rid) {
+
                Ok(exists) => {
+
                    if exists {
+
                        continue;
+
                    }
+
                }
+
                Err(err) => {
+
                    log::warn!(target: "protocol::filter", "Failed to check if {rid} exists: {err}");
+
                    continue;
+
                }
            }
            match self.seeds(&rid, [self.node_id()].into()) {
                Ok(seeds) => {