             }
         }
         
-        if sqlite3_errcode(db) != SQLITE_OK { print(String(cString: sqlite3_errmsg(db))) }
+        if sqlite3_errcode(db) != SQLITE_DONE { print(String(cString: sqlite3_errmsg(db))) }
     }
     
     func txDeleted(_ txHash: UInt256, notifyUser: Bool, recommendRescan: Bool) {

        defer { sqlite3_finalize(sql) }
        sqlite3_bind_blob(sql, 1, [txHash], Int32(MemoryLayout<UInt256>.size), SQLITE_TRANSIENT)

        guard sqlite3_step(sql) == SQLITE_OK else {
            print(String(cString: sqlite3_errmsg(db)))
            return
        }

            sqlite3_bind_int64(sql2, 4, Int64(bitPattern: p.services))
            sqlite3_bind_int64(sql2, 5, Int64(bitPattern: p.timestamp))

            guard sqlite3_step(sql2) == SQLITE_DONE else {
                print(String(cString: sqlite3_errmsg(db)))
                return
            }
