treasureHash, but incorrectly checks a different storage key:The contract checks whether a treasure has already been claimed using a different key than the one it writes to.
Instead of checking the user-supplied treasureHash, it checks _treasureHash, which is never initialized and defaults to bytes32(0).
The issue occurs on every call to claim() because _treasureHash is always bytes32(0)
Multiple rewards can be claimed for the same treasure
Replace testClaimDoubleSpendReverts() with:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.