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)
def __init__(self, amount, expiration, hashlock): assert amount > 0 assert ishash(hashlock) self.amount = amount self.expiration = expiration self.hashlock = hashlock