mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
The original tests called precompile.Run() directly and expected the PQ refusal to happen inside the precompile body. That contract no longer holds: after CR-1, every classical precompile's Run() body is strict-PQ-agnostic — the gate lives in (*EVM).runPrecompile and reads the per-chain Profile from ChainConfig.PQ. This rewrite tests the two contracts the plugin layer is actually responsible for: 1. AllForbidden() == pq.Strict() (Hash() identity check) — every classical primitive family flagged. 2. (*Profile).RefuseUnder(op) returns the family-specific sentinel error for every op a strict-PQ chain must refuse. 3. nil profile (the default for non-PQ chains) admits every op. Cross-precompile integration coverage (the strict-PQ chain runs an EVM that actually refuses ecrecover at the boundary) lives in geth/core/vm/pq_gate_test.go — closer to the dispatch chokepoint and not duplicated here.