Fix block downloading for shared state
parent
78e533952c
commit
9f1f1435ce
|
@ -89,7 +89,7 @@ def download_blocks_from_communicator(comm_inst: "OnionrCommunicatorDaemon"):
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Attempting to download %s from {peerUsed}..." % (blockHash[:12],))
|
f"Attempting to download %s from {peerUsed}..." % (blockHash[:12],))
|
||||||
content = peeraction.peer_action(
|
content = peeraction.peer_action(
|
||||||
comm_inst, peerUsed,
|
comm_inst.shared_state, peerUsed,
|
||||||
'getdata/' + blockHash,
|
'getdata/' + blockHash,
|
||||||
max_resp_size=3000000) # block content from random peer
|
max_resp_size=3000000) # block content from random peer
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ def lookup_blocks_from_communicator(comm_inst):
|
||||||
listLookupCommand += '?date=%s' % (lastLookupTime,)
|
listLookupCommand += '?date=%s' % (lastLookupTime,)
|
||||||
try:
|
try:
|
||||||
newBlocks = peeraction.peer_action(
|
newBlocks = peeraction.peer_action(
|
||||||
comm_inst,
|
comm_inst.shared_state,
|
||||||
peer, listLookupCommand) # get list of new block hashes
|
peer, listLookupCommand) # get list of new block hashes
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|
Loading…
Reference in New Issue