def save_channel(self, chan: Channel):
    assert (type(chan) is Channel)
    if (chan.config[REMOTE].next_per_commitment_point == chan.config[REMOTE].current_per_commitment_point):
        raise Exception('Tried to save channel with next_point == current_point, this should not happen')
    self.wallet.save_db()
    util.trigger_callback('channel', self.wallet, chan)
def save_channel(self, chan: Channel):
    assert (type(chan) is Channel)
    if (chan.config[REMOTE].next_per_commitment_point == chan.config[REMOTE].current_per_commitment_point):
        raise Exception('Tried to save channel with next_point == current_point, this should not happen')
    self.wallet.save_db()
    util.trigger_callback('channel', self.wallet, chan)