NagyZoltanPeter 1339be1f5e
refactor(core): make WakuMessage a ref object with structural ==/clone
Change WakuMessage from a value object to a ref object so assignments,
async-closure captures, and Result/Option bind-outs cost a pointer +
refcount instead of deep-copying the three seqs + string.

- structural `==` (nil-aware, field-wise) so message equality assertions
  keep working under ref identity
- `clone()` explicit deep copy for the rare mutate-a-held-message case
- rewrite `ensureTimestampSet` to be non-mutating (clone when unset)
  instead of `result = message; result.timestamp = ...`, which under ref
  semantics would mutate the shared input
- new unit tests: structural == incl. nil, clone independence,
  ensureTimestampSet same-ref/fresh-ref behaviour

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 04:47:05 +02:00
..
2026-07-09 15:57:16 -03:00