forked from LBRYCommunity/lbry-sdk
fixes
This commit is contained in:
parent
9b27e81940
commit
893b4fc3ca
3 changed files with 4 additions and 5 deletions
|
@ -303,7 +303,7 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
# open the next blob to send
|
# open the next blob to send
|
||||||
blob_hash = self.blob_hashes_to_send[0]
|
blob_hash = self.blob_hashes_to_send[0]
|
||||||
self.blob_hashes_to_send = self.blob_hashes_to_send[1:]
|
self.blob_hashes_to_send = self.blob_hashes_to_send[1:]
|
||||||
d = self.blob_manager.get_blob(blob_hash)
|
d = defer.succeed(self.blob_manager.get_blob(blob_hash))
|
||||||
d.addCallback(self.open_blob_for_reading)
|
d.addCallback(self.open_blob_for_reading)
|
||||||
d.addCallbacks(lambda _: self.send_blob_info(),
|
d.addCallbacks(lambda _: self.send_blob_info(),
|
||||||
lambda err: self.skip_missing_blob(err, blob.blob_hash))
|
lambda err: self.skip_missing_blob(err, blob.blob_hash))
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import asyncio
|
|
||||||
import logging
|
import logging
|
||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
|
|
||||||
|
@ -15,6 +14,7 @@ from torba.rpc.jsonrpc import CodeMessageError
|
||||||
|
|
||||||
from lbrynet.schema.claim import ClaimDict
|
from lbrynet.schema.claim import ClaimDict
|
||||||
|
|
||||||
|
from lbrynet.extras.compat import f2d
|
||||||
from lbrynet.extras.wallet.ledger import MainNetLedger
|
from lbrynet.extras.wallet.ledger import MainNetLedger
|
||||||
from lbrynet.extras.wallet.account import BaseAccount, generate_certificate
|
from lbrynet.extras.wallet.account import BaseAccount, generate_certificate
|
||||||
from lbrynet.extras.wallet.transaction import Transaction
|
from lbrynet.extras.wallet.transaction import Transaction
|
||||||
|
@ -611,8 +611,7 @@ class LBRYcrdAddressQueryHandler:
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def handle_queries(self, queries):
|
def handle_queries(self, queries):
|
||||||
if self.query_identifiers[0] in queries:
|
if self.query_identifiers[0] in queries:
|
||||||
future = self.wallet.get_unused_address_for_peer(self.peer)
|
address = yield f2d(self.wallet.get_unused_address_for_peer(self.peer))
|
||||||
address = yield defer.Deferred.fromFuture(asyncio.ensure_future(future))
|
|
||||||
self.address = address
|
self.address = address
|
||||||
fields = {'lbrycrd_address': address}
|
fields = {'lbrycrd_address': address}
|
||||||
return fields
|
return fields
|
||||||
|
|
|
@ -167,7 +167,7 @@ class ServerRequestHandler:
|
||||||
ds = []
|
ds = []
|
||||||
for query_handler, query_identifiers in self.query_handlers.items():
|
for query_handler, query_identifiers in self.query_handlers.items():
|
||||||
queries = {q_i: msg[q_i] for q_i in query_identifiers if q_i in msg}
|
queries = {q_i: msg[q_i] for q_i in query_identifiers if q_i in msg}
|
||||||
d = defer.succeed(query_handler.handle_queries(queries))
|
d = defer.maybeDeferred(query_handler.handle_queries(queries))
|
||||||
d.addErrback(log_errors)
|
d.addErrback(log_errors)
|
||||||
ds.append(d)
|
ds.append(d)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue