Commit Graph
1 Commits
Author SHA1 Message Date
DanSandClaude Opus 4.8 ae7e085144 gtest: regression guard for the hush_checkPOW height-0 RandomX re-check
A forged-RandomX block reaches hush_checkPOW(0,pblock,0) over the P2P accept
path; the first CheckRandomXSolution runs at height 0 (skipped), the height is
recovered from hashPrevBlock, and fix (a) re-runs CheckRandomXSolution at the
real height. The test drives the same forged block through hush_checkPOW twice:
with the parent unknown the height stays 0 and the block is not rejected here
(the pre-fix outcome), and with the parent known at height 9 the recovered
height makes the fix reject it. The A/B contrast fails if the re-check is
reverted. Also asserts CheckRandomXSolution is skipped at height 0 and rejects
the forgery at the real height.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-29 01:25:37 -05:00