electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 529e96aaf9a90be5c7d48db704c43eaeb751263b
parent 1dbff51fce762c212913c2c446d6e5945f283f75
Author: SomberNight <somber.night@protonmail.com>
Date:   Fri,  5 Mar 2021 21:04:20 +0100

synchronizer: (trivial) add comment

Diffstat:
Melectrum/synchronizer.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/electrum/synchronizer.py b/electrum/synchronizer.py @@ -93,10 +93,11 @@ class SynchronizerBase(NetworkJobOnDefaultServer): asyncio.run_coroutine_threadsafe(self._add_address(addr), self.asyncio_loop) async def _add_address(self, addr: str): + # note: this method is async as add_queue.put_nowait is not thread-safe. if not is_address(addr): raise ValueError(f"invalid bitcoin address {addr}") if addr in self.requested_addrs: return self.requested_addrs.add(addr) - await self.add_queue.put(addr) + self.add_queue.put_nowait(addr) async def _on_address_status(self, addr, status): """Handle the change of the status of an address."""