aboutsummaryrefslogtreecommitdiffstats
path: root/src/ops.rs
diff options
context:
space:
mode:
authormurilo ijanc2026-03-27 11:58:41 -0300
committermurilo ijanc2026-03-27 11:58:41 -0300
commit75fddf425102369828f7e8366ebdad4ea086fd07 (patch)
treeb3ba7541c16fb496e85a96b4ba2bf4825f80962f /src/ops.rs
parent18fa0f13f64e69bf70addc1e28a8ab0a39207eb2 (diff)
downloadtesseras-paste-75fddf425102369828f7e8366ebdad4ea086fd07.tar.gz
Bump version to 0.1.3, update tesseras-dht to 0.1.4v0.1.3
- Block marker on delete prevents DHT re-import - Remote delete propagation via delete_callback - New index page with project info and man page links - Fix lookups status order (started/completed)
Diffstat (limited to 'src/ops.rs')
-rw-r--r--src/ops.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ops.rs b/src/ops.rs
index 45fb919..f45b9ab 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -151,13 +151,17 @@ pub fn get_paste(
}
/// Delete a paste from local store and the DHT.
+/// Creates a block marker so the paste is not
+/// re-imported from the DHT by sync.
pub fn delete_paste(
node: &mut Node,
store: &PasteStore,
key_str: &str,
) -> Result<(), PasteError> {
let hash = parse_hash(key_str)?;
+ store.block(&hash);
store.remove_paste(&hash);
+ store.unpin(&hash).ok();
node.delete(&hash);
let hash_b58 = key_str.split_once('#').map(|(h, _)| h).unwrap_or(key_str);
log::info!("del: removed paste {hash_b58}");