```\nmodifier checkpointProtection(address account) {\n    uint256 numCheckpoints = _stakes[account]._checkpoints.length;\n    require(numCheckpoints == 0 || _stakes[account]._checkpoints[numCheckpoints - 1]._blockNumber != block.number, "StakingModule: Cannot exit in the same block as another stake or exit");\n    _;\n}\n```\n