commit
767f78315b
1 changed files with 5 additions and 7 deletions
|
@ -924,7 +924,7 @@ class LBRYumWallet(LBRYWallet):
|
||||||
network_start_d = defer.Deferred()
|
network_start_d = defer.Deferred()
|
||||||
|
|
||||||
def setup_network():
|
def setup_network():
|
||||||
self.config = SimpleConfig()
|
self.config = SimpleConfig({'auto_connect': True})
|
||||||
self.network = Network(self.config)
|
self.network = Network(self.config)
|
||||||
alert.info("Loading the wallet...")
|
alert.info("Loading the wallet...")
|
||||||
return defer.succeed(self.network.start())
|
return defer.succeed(self.network.start())
|
||||||
|
@ -996,7 +996,7 @@ class LBRYumWallet(LBRYWallet):
|
||||||
blockchain_caught_d = defer.Deferred()
|
blockchain_caught_d = defer.Deferred()
|
||||||
|
|
||||||
def check_caught_up():
|
def check_caught_up():
|
||||||
local_height = self.network.get_local_height()
|
local_height = self.network.get_catchup_progress()
|
||||||
remote_height = self.network.get_server_height()
|
remote_height = self.network.get_server_height()
|
||||||
|
|
||||||
if remote_height != 0 and remote_height - local_height <= 5:
|
if remote_height != 0 and remote_height - local_height <= 5:
|
||||||
|
@ -1122,11 +1122,9 @@ class LBRYumWallet(LBRYWallet):
|
||||||
|
|
||||||
def _do_send_many(self, payments_to_send):
|
def _do_send_many(self, payments_to_send):
|
||||||
log.warning("Doing send many. payments to send: %s", str(payments_to_send))
|
log.warning("Doing send many. payments to send: %s", str(payments_to_send))
|
||||||
outputs = [(TYPE_ADDRESS, address, int(amount*COIN)) for address, amount in payments_to_send.iteritems()]
|
cmd = known_commands['paytomanyandsend']
|
||||||
d = threads.deferToThread(self.wallet.mktx, outputs, None, self.config)
|
func = getattr(self.cmd_runner, cmd.name)
|
||||||
d.addCallback(lambda tx: threads.deferToThread(self.wallet.sendtx, tx))
|
return threads.deferToThread(func, payments_to_send.iteritems())
|
||||||
d.addCallback(self._save_wallet)
|
|
||||||
return d
|
|
||||||
|
|
||||||
def _get_value_for_name(self, name):
|
def _get_value_for_name(self, name):
|
||||||
cmd = known_commands['getvalueforname']
|
cmd = known_commands['getvalueforname']
|
||||||
|
|
Loading…
Add table
Reference in a new issue