pub fn elect<T: Config>(payload: ElectionPayloadOf<T>, _signature: T::Signature)Expand description
Execute the election for the upcoming session.
This extrinsic allows an author to act as the election runner for the election session (next-session). It verifies the author’s affidavit-based signature, prepares the election using all submitted affidavits, and records the runner for audit and reward attribution.
Since this is an unsigned extrinsic, it is constructed and submitted by validator offchain workers (OCWs).
Although unsigned, it is treated as a pseudo-inherent:
- It is authorized via affidavit signature verification
- It may carry rewards for successfully running the election
- It is expected to be submitted locally by validators rather than propagated by external transaction authors
§Errors
Returns a DispatchError if election execution or authorization fails.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::elect.