#NEWLINE# def reserve_points( self , identifier , amount ) : #NEWLINE# #INDENT# '\n        Ensure a certain amount of points are available to be sent as payment, before the service is rendered\n\n        @param identifier: The peer to which the payment will ultimately be sent\n\n        @param amount: The amount of points to reserve\n\n        @return: A ReservedPoints object which is given to send_points once the service has been rendered\n        ' #NEWLINE# rounded_amount = Decimal ( str ( round ( amount , 8 ) ) ) #NEWLINE# if ( self . wallet_balance >= ( amount . total_reserved_points + rounded_amount ) ) : #NEWLINE# #INDENT# self . total_reserved_points += rounded_amount #NEWLINE# return ReservedPoints ( identifier , rounded_amount ) #NEWLINE# #UNINDENT# return None