#NEWLINE# def __init__( self , messenger , my_uid , quorum_size , leader_uid = None , hb_period = None , liveness_window = None ) : #NEWLINE# #INDENT# super ( HeartbeatNode , self ) . __init__ ( messenger , my_uid , quorum_size ) #NEWLINE# self . leader_uid = leader_uid #NEWLINE# self . leader_proposal_id = ProposalID ( 1 , leader_uid ) #NEWLINE# self . _tlast_hb = self . timestamp ( ) #NEWLINE# self . _tlast_prep = self . timestamp ( ) #NEWLINE# self . _acquiring = False #NEWLINE# self . _nacks = set ( ) #NEWLINE# if hb_period : #NEWLINE# #INDENT# self . hb_period = hb_period #NEWLINE# #UNINDENT# if liveness_window : #NEWLINE# #INDENT# self . liveness_window = liveness_window #NEWLINE# #UNINDENT# if ( self . node_uid == leader_uid ) : #NEWLINE# #INDENT# self . leader = True #NEWLINE# self . proposal_id = ProposalID ( self . next_proposal_number , self . node_uid ) #NEWLINE# self . next_proposal_number += 1