def remove_channel(self, chan_id):
    chan = self.channels[chan_id]
    assert chan.can_be_deleted()
    with self.lock:
        self._channels.pop(chan_id)
        self.db.get('channels').pop(chan_id.hex())
    for addr in chan.get_wallet_addresses_channel_might_want_reserved():
        self.wallet.set_reserved_state_of_address(addr, reserved=False)
    util.trigger_callback('channels_updated', self.wallet)
    util.trigger_callback('wallet_updated', self.wallet)
def remove_channel(self, chan_id):
    chan = self.channels[chan_id]
    assert chan.can_be_deleted()
    with self.lock:
        self._channels.pop(chan_id)
        self.db.get('channels').pop(chan_id.hex())
    for addr in chan.get_wallet_addresses_channel_might_want_reserved():
        self.wallet.set_reserved_state_of_address(addr, reserved=False)
    util.trigger_callback('channels_updated', self.wallet)
    util.trigger_callback('wallet_updated', self.wallet)