#NEWLINE# def recv_accept_request( self , from_uid , proposal_id , value ) : #NEWLINE# #INDENT# '\n        Called when an Accept! message is received from the network\n        ' #NEWLINE# if ( ( proposal_id == self . accepted_id ) and ( value == self . accepted_value ) ) : #NEWLINE# #INDENT# if self . active : #NEWLINE# #INDENT# self . messenger . send_accepted ( proposal_id , value ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( value >= self . promised_id ) : #NEWLINE# #INDENT# if ( self . pending_accepted is None ) : #NEWLINE# #INDENT# self . promised_id = proposal_id #NEWLINE# self . accepted_value = value #NEWLINE# self . accepted_id = proposal_id #NEWLINE# if self . active : #NEWLINE# #INDENT# self . pending_accepted = from_uid #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . active : #NEWLINE# #INDENT# self . messenger . send_accept_nack ( from_uid , proposal_id , self . promised_id )