1
0

synchronizer/verifier: ensure fairness between wallets (follow-up)

follow-up to 4346d2fc76

It's not just about the Synchronizer, the Verifier should not starve other jobs either...
(previously I thought the Verifier is not too important as it only makes
requests if there are new txs; however with LNWatcher its progress is not persisted)
This commit is contained in:
SomberNight
2021-03-01 13:08:01 +01:00
parent e0cfb2179d
commit bf7129d57e
4 changed files with 11 additions and 7 deletions

View File

@@ -96,7 +96,8 @@ class SPV(NetworkJobOnDefaultServer):
async def _request_and_verify_single_proof(self, tx_hash, tx_height):
try:
merkle = await self.network.get_merkle_for_transaction(tx_hash, tx_height)
async with self._network_request_semaphore:
merkle = await self.network.get_merkle_for_transaction(tx_hash, tx_height)
except UntrustedServerReturnedError as e:
if not isinstance(e.original_exception, aiorpcx.jsonrpc.RPCError):
raise