Created
April 25, 2021 18:12
-
-
Save samueleresca/8aa60efe4bb69683ff62aed5d5787224 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from quoracle import QuorumSystem, Node | |
if __name__ == '__main__': | |
a, b, c = Node('a'), Node('b'), Node('c') | |
majority = QuorumSystem(reads=a*b + b*c + a*c) | |
print(majority.load(read_fraction=1)) # 2/3 | |
print(majority.capacity(read_fraction=1)) # 3/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment