Beispiel #1
0
 def __init__(self, msg_or_echo, *args):
     if isinstance(msg_or_echo, SignedMessage):
         self.echo = msg_or_echo.hash
     else:
         assert ishash(msg_or_echo)
         self.echo = msg_or_echo
     super(BaseError, self).__init__(*args)
Beispiel #2
0
 def __init__(self, msg_or_echo, *args):
     if isinstance(msg_or_echo, SignedMessage):
         self.echo = msg_or_echo.hash
     else:
         assert ishash(msg_or_echo)
         self.echo = msg_or_echo
     super(BaseError, self).__init__(*args)
Beispiel #3
0
 def __init__(self,  amount, expiration, hashlock):
     assert amount > 0
     assert ishash(hashlock)
     self.amount = amount
     self.expiration = expiration
     self.hashlock = hashlock
Beispiel #4
0
 def __init__(self, amount, expiration, hashlock):
     assert amount > 0
     assert ishash(hashlock)
     self.amount = amount
     self.expiration = expiration
     self.hashlock = hashlock