stubbsta 43dff68f49
Fix ResultDefect on success and stale test stubs in lightpush retry path
Two bugs left by a bad merge:

1. lightpush.nim: isRlnRelatedFailure was computed before firstResult.isOk()
   was checked, accessing firstResult.error unconditionally. When publish
   succeeds, this raises a ResultDefect. Reorder the guard so isOk()/isNone()
   short-circuits before the error fields are touched.

2. test_wakunode_lightpush.nim: the 420-retry stubs used descriptions
   ("simulated stale merkle path", "still stale") that don't contain
   RlnValidatorErrorMsg. The code gates 420 retries on that substring to
   distinguish RLN rejections from unrelated INVALID_MESSAGE responses
   (e.g. oversized messages). Update stubs to emit RlnValidatorErrorMsg so
   the retry path fires as the tests expect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 10:03:48 +02:00
..