From 9f1f1435ce1c85ff51fcca61fbb5a06fae11e7cb Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 23 Aug 2020 11:53:49 -0500 Subject: [PATCH] Fix block downloading for shared state --- src/communicatorutils/downloadblocks/__init__.py | 2 +- src/communicatorutils/lookupblocks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/communicatorutils/downloadblocks/__init__.py b/src/communicatorutils/downloadblocks/__init__.py index fc7aceef..9b564847 100755 --- a/src/communicatorutils/downloadblocks/__init__.py +++ b/src/communicatorutils/downloadblocks/__init__.py @@ -89,7 +89,7 @@ def download_blocks_from_communicator(comm_inst: "OnionrCommunicatorDaemon"): logger.info( f"Attempting to download %s from {peerUsed}..." % (blockHash[:12],)) content = peeraction.peer_action( - comm_inst, peerUsed, + comm_inst.shared_state, peerUsed, 'getdata/' + blockHash, max_resp_size=3000000) # block content from random peer diff --git a/src/communicatorutils/lookupblocks.py b/src/communicatorutils/lookupblocks.py index f3b9e942..26c152c5 100755 --- a/src/communicatorutils/lookupblocks.py +++ b/src/communicatorutils/lookupblocks.py @@ -89,7 +89,7 @@ def lookup_blocks_from_communicator(comm_inst): listLookupCommand += '?date=%s' % (lastLookupTime,) try: newBlocks = peeraction.peer_action( - comm_inst, + comm_inst.shared_state, peer, listLookupCommand) # get list of new block hashes except Exception as error: logger.warn(