fix(archive): initialize WakuMessage in postgres row decode

`var wakuMessage: WakuMessage` now defaults to nil under ref semantics;
the subsequent field assignments would deref nil. Construct explicitly
with `= WakuMessage()`. The var is fresh per loop iteration, so no
cross-row aliasing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
NagyZoltanPeter 2026-07-15 04:47:22 +02:00
parent 5d3fb0cff0
commit 71f59c6464
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42

View File

@ -257,7 +257,7 @@ proc rowCallbackImpl(
version: uint
timestamp: Timestamp
meta: string
wakuMessage: WakuMessage
wakuMessage: WakuMessage = WakuMessage()
rawHash = $(pqgetvalue(pqResult, iRow, 0))
pubSubTopic = $(pqgetvalue(pqResult, iRow, 1))