Problem Definition
Dead code: in the zero height export logic in prepForZeroHeightGenesis(), an “intra-tx counter” was declared and incremented, but its value was never read and did not affect code execution.
The counter is declared and incremented in prepForZeroHeightGenesis(), but no branch of the code reads or checks it. There are no references to the variable, no logic based on it, and no side effects.
The comment next to it claimed that zero-height exports reset the intra-tx counter, which is not actually the case (only bond heights and the associated state are reset).
Proposal
#8685