#NEWLINE# def validate( self , registering = False ) : #NEWLINE# #INDENT# 'Make sure this farmer fits the rules for this node.' #NEWLINE# if ( not is_btc_address ( self . payout_addr ) ) : #NEWLINE# #INDENT# msg = 'Invalid BTC Address: {0}' . format ( self . payout_addr ) #NEWLINE# logger . warning ( msg ) #NEWLINE# raise ValueError ( msg ) #NEWLINE# #UNINDENT# exists = self . exists ( ) #NEWLINE# if ( exists and registering ) : #NEWLINE# #INDENT# msg = 'Address already registered: {0}' . format ( self . payout_addr ) #NEWLINE# logger . warning ( msg ) #NEWLINE# raise LookupError ( registering )