37 lines
822 B
Python
37 lines
822 B
Python
from proposal import Proposal
|
|
|
|
class Messenger():
|
|
def send_prepare(self, proposal_id):
|
|
'''
|
|
Broadcasts a Prepare message to all Acceptors
|
|
'''
|
|
|
|
NotImplementedError
|
|
|
|
def send_promise(self, proposer_id, proposal_id, previous_proposal):
|
|
'''
|
|
Sends a Promise message to the specified Proposer
|
|
'''
|
|
|
|
NotImplementedError
|
|
|
|
def send_accept(self, proposal):
|
|
'''
|
|
Broadcasts an Accept message to all Acceptors
|
|
'''
|
|
|
|
NotImplementedError
|
|
|
|
def send_accepted(self, proposal):
|
|
'''
|
|
Broadcasts an Accepted message to all Learners
|
|
'''
|
|
|
|
NotImplementedError
|
|
|
|
def on_resolution(self, proposal_id, value):
|
|
'''
|
|
Called when a resolution is reached
|
|
'''
|
|
|
|
NotImplementedError |