caelum0x 948ebfd761 fix(zcash): assign amount tags atomically per payTo
Tag assignment was read-then-write, so concurrent sessions paying the same
transparent address could lock the same tag and one payment would match
both. The base quote is now locked with tag 0 and the tag is chosen and
saved under a per-payTo lock (pg_advisory_xact_lock(hashtext(key)) shared
by the API and checkout when Postgres is wired, an in-process mutex
otherwise), with a post-save uniqueness re-check that retries on the next
tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:04:13 +03:00
..