Merge pull request #97 from lbryio/lbryum-catchup

lbryum fixes
This commit is contained in:
Jack Robison 2016-07-20 22:33:16 -04:00 committed by GitHub
commit 767f78315b

View file

@ -924,7 +924,7 @@ class LBRYumWallet(LBRYWallet):
network_start_d = defer.Deferred()
def setup_network():
self.config = SimpleConfig()
self.config = SimpleConfig({'auto_connect': True})
self.network = Network(self.config)
alert.info("Loading the wallet...")
return defer.succeed(self.network.start())
@ -996,7 +996,7 @@ class LBRYumWallet(LBRYWallet):
blockchain_caught_d = defer.Deferred()
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()
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):
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()]
d = threads.deferToThread(self.wallet.mktx, outputs, None, self.config)
d.addCallback(lambda tx: threads.deferToThread(self.wallet.sendtx, tx))
d.addCallback(self._save_wallet)
return d
cmd = known_commands['paytomanyandsend']
func = getattr(self.cmd_runner, cmd.name)
return threads.deferToThread(func, payments_to_send.iteritems())
def _get_value_for_name(self, name):
cmd = known_commands['getvalueforname']