Require: Nodes participating in the campaign exist | |
Ensure: Select the candidate node | |
1: | Initialize the number of participating node votes |
2: | For delegation in delegations do |
3: | If delegate a representative online then |
4: | If the delegation is valid for the duration of the authorization then |
5: | The total number of votes received by the delegate plus the number of votes authorized by that delegate; |
6: | End if |
7: | End if |
8: | End for |
9: | Sorts nodes in descending order of total votes |
10: | Return 𝑛 nodes with the most votes |