Пример #1
0
    def update_status_lnd_channels(self):
        if IS_WIN32_ENV:
            return

        # log.debug("update_status_lnd_channel due: {}".format(self.status_lnd_channel_due))
        if self.status_lnd_channel_due <= self.uptime:
            log.debug("updating status_lnd_channels")
            stub_readonly = ReadOnlyStub(network=self.rb_cfg.network, chain=self.rb_cfg.chain)
            self.status_lnd_channel_total_active, self.status_lnd_channel_total_remote_balance = \
                check_lnd_channels(stub_readonly)
            # set next due time
            self.status_lnd_channel_due = self.uptime + self.status_lnd_channel_interval
Пример #2
0
    def update_status_lnd_channels(self):

        if IS_WIN32_ENV:
            return

        log.debug("update_status_lnd_channel due: {}".format(self.status_lnd_channel_due))
        if self.status_lnd_channel_due <= self.uptime:
            log.debug("updating status_lnd_channels")

            try:
                with ReadOnlyStub(network=self.rb_cfg.network.value, chain=self.rb_cfg.chain.value) as stub_readonly:
                    self.status_lnd_channel_total_active, self.status_lnd_channel_total_remote_balance = \
                        check_lnd_channels(stub_readonly)
                    # set next due time
                    self.status_lnd_channel_due = self.uptime + self.status_lnd_channel_interval
            except Exception as err:
                log.info("Exception on update_status_lnd_channels")
                pass