Updated proof_of_stake.py

This commit is contained in:
DIVYASREE S 2024-10-10 21:46:12 +05:30 committed by GitHub
parent 8b9ff8d4f3
commit e14f6d5122
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ def choose_validator(validators: list[Validator]) -> Validator:
Validator: The selected validator based on weighted random selection. Validator: The selected validator based on weighted random selection.
Example: Example:
>>> validators = [Validator("Alice", 50), Validator("Bob", 30), Validator("Charlie", 20)] >>> validators = [Validator("Alice", 50), Validator("Bob", 30)]
>>> chosen = choose_validator(validators) >>> chosen = choose_validator(validators)
>>> isinstance(chosen, Validator) >>> isinstance(chosen, Validator)
True True