This is a preliminary step before being able to register a vote on a proof.
The vote registration logic will be the exact same between blocks and proofs, but works on different types. Using a generic lambda makes it possible to share the code snippet for any types with a compatible interface.
There is no change in behavior.
Ref T1854.