mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Updated proof_of_stake.py
This commit is contained in:
parent
8b9ff8d4f3
commit
e14f6d5122
|
@ -27,7 +27,7 @@ def choose_validator(validators: list[Validator]) -> Validator:
|
|||
Validator: The selected validator based on weighted random selection.
|
||||
|
||||
Example:
|
||||
>>> validators = [Validator("Alice", 50), Validator("Bob", 30), Validator("Charlie", 20)]
|
||||
>>> validators = [Validator("Alice", 50), Validator("Bob", 30)]
|
||||
>>> chosen = choose_validator(validators)
|
||||
>>> isinstance(chosen, Validator)
|
||||
True
|
||||
|
|
Loading…
Reference in New Issue
Block a user