refactor: replaceable check in event

This commit is contained in:
Greg Heartsfield
2023-01-15 09:18:53 -06:00
parent 0db6487ce3
commit 703b2efe6e
3 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ fn write_event(tx: &Transaction, e: Event) -> Result<usize> {
)?;
}
}
if e.kind == 0 || e.kind == 3 || e.kind == 41 || (e.kind >= 10000 && e.kind < 20000) {
if e.is_replaceable() {
//let query = "SELECT id FROM event WHERE kind=? AND author=? ORDER BY created_at DESC LIMIT 1;";
//let count: usize = tx.query_row(query, params![e.kind, pubkey_blob], |row| row.get(0))?;
//info!("found {} rows that /would/ be preserved", count);