feat(db): add channel_messages.raw_packet column for raw resend

Stores the full hex packet snapshot (header+transport_codes+path_len+payload)
captured at send time, enabling future "Resend (same packet hash)" feature
that lets repeaters deduplicate via Packet::calculatePacketHash while still
forwarding to nodes that didn't hear the original.

NULL for received and pre-migration rows (resend button stays disabled there).
PR #1 of 5; subsequent PRs wire up send-time capture, backend endpoint, echo
list merge, and UI.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-06-09 12:15:44 +02:00
parent d16093b459
commit bed838c365
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -86,6 +86,7 @@ CREATE TABLE IF NOT EXISTS channel_messages (
snr REAL,
path_len INTEGER,
pkt_payload TEXT, -- for echo matching
raw_packet TEXT, -- full hex packet (header+codes+path_len+payload) for raw resend; NULL for received/legacy rows
raw_json TEXT, -- original JSON line
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);