mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
Merge branch 'master' of git://github.com/spesmilo/electrum
This commit is contained in:
commit
8e65df3ae7
3 changed files with 8 additions and 4 deletions
|
@ -689,6 +689,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
for item in self.wallet.get_history(self.current_account):
|
for item in self.wallet.get_history(self.current_account):
|
||||||
tx_hash, conf, value, timestamp, balance = item
|
tx_hash, conf, value, timestamp, balance = item
|
||||||
time_str = _("unknown")
|
time_str = _("unknown")
|
||||||
|
if conf is None and timestamp is None:
|
||||||
|
continue # skip history in offline mode
|
||||||
|
|
||||||
if conf > 0:
|
if conf > 0:
|
||||||
time_str = self.format_time(timestamp)
|
time_str = self.format_time(timestamp)
|
||||||
if conf == -1:
|
if conf == -1:
|
||||||
|
|
|
@ -744,7 +744,8 @@ class Abstract_Wallet(object):
|
||||||
#balance += value
|
#balance += value
|
||||||
conf, timestamp = self.verifier.get_confirmations(tx_hash) if self.verifier else (None, None)
|
conf, timestamp = self.verifier.get_confirmations(tx_hash) if self.verifier else (None, None)
|
||||||
history.append( (tx_hash, conf, value, timestamp) )
|
history.append( (tx_hash, conf, value, timestamp) )
|
||||||
history.sort(key = lambda x: self.verifier.get_txpos(x[0]))
|
if self.verifier:
|
||||||
|
history.sort(key = lambda x: self.verifier.get_txpos(x[0]))
|
||||||
|
|
||||||
c, u = self.get_balance(domain)
|
c, u = self.get_balance(domain)
|
||||||
balance = c + u
|
balance = c + u
|
||||||
|
|
|
@ -185,7 +185,7 @@ class Plugin(BasePlugin):
|
||||||
try:
|
try:
|
||||||
resolver = dns.resolver.Resolver()
|
resolver = dns.resolver.Resolver()
|
||||||
resolver.timeout = 2.0
|
resolver.timeout = 2.0
|
||||||
resolver.lifetime = 2.0
|
resolver.lifetime = 4.0
|
||||||
records = resolver.query(url, dns.rdatatype.TXT)
|
records = resolver.query(url, dns.rdatatype.TXT)
|
||||||
for record in records:
|
for record in records:
|
||||||
string = record.strings[0]
|
string = record.strings[0]
|
||||||
|
@ -232,7 +232,7 @@ class Plugin(BasePlugin):
|
||||||
for i in xrange(len(parts), 0, -1):
|
for i in xrange(len(parts), 0, -1):
|
||||||
sub = '.'.join(parts[i - 1:])
|
sub = '.'.join(parts[i - 1:])
|
||||||
query = dns.message.make_query(sub, dns.rdatatype.NS)
|
query = dns.message.make_query(sub, dns.rdatatype.NS)
|
||||||
response = dns.query.udp(query, ns, 1)
|
response = dns.query.udp(query, ns, 3)
|
||||||
if response.rcode() != dns.rcode.NOERROR:
|
if response.rcode() != dns.rcode.NOERROR:
|
||||||
self.print_error("query error")
|
self.print_error("query error")
|
||||||
return 0
|
return 0
|
||||||
|
@ -250,7 +250,7 @@ class Plugin(BasePlugin):
|
||||||
query = dns.message.make_query(sub,
|
query = dns.message.make_query(sub,
|
||||||
dns.rdatatype.DNSKEY,
|
dns.rdatatype.DNSKEY,
|
||||||
want_dnssec=True)
|
want_dnssec=True)
|
||||||
response = dns.query.udp(query, ns, 1)
|
response = dns.query.udp(query, ns, 3)
|
||||||
if response.rcode() != 0:
|
if response.rcode() != 0:
|
||||||
self.print_error("query error")
|
self.print_error("query error")
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue