From b3c7852b1988c6cb1ad403d59723c2f138d104b8 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sun, 12 Dec 2021 14:34:52 -0600 Subject: [PATCH] fix: correct SQL query for inserting pubkeys --- src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 6fbaa32..415ec29 100644 --- a/src/db.rs +++ b/src/db.rs @@ -145,7 +145,7 @@ pub fn write_event(conn: &mut Connection, e: &Event) -> Result { if !ptags.is_empty() { for ptag in ptags.iter() { tx.execute( - "INSERT OR IGNORE INTO event_ref (event_id, referenced_pubkey) VALUES (?1, ?2)", + "INSERT OR IGNORE INTO pubkey_ref (event_id, referenced_pubkey) VALUES (?1, ?2)", params![ev_id, hex::decode(&ptag).ok()], )?; }