1
0
Files
electrum/electrum
SomberNight 4887fb3e7f util.with_lock: add support for chaining with @event_listener
Consider e.g.:
```
class AddressSynchronizer(Logger, EventListener):
[... snip ...]
    @event_listener
    @with_lock
    def on_event_blockchain_updated(self, *args):
        self._get_balance_cache = {}  # invalidate cache
        self.db.put('stored_height', self.get_local_height())
```

was raising:
```
func.__qualname__='with_lock.<locals>.func_wrapper'
Traceback (most recent call last):
  File "...\electrum\run_electrum", line 105, in <module>
    from electrum.logging import get_logger, configure_logging  # import logging submodule first
  File "...\electrum\electrum\__init__.py", line 19, in <module>
    from .wallet import Wallet
  File "...\electrum\electrum\wallet.py", line 70, in <module>
    from .address_synchronizer import (
  File "...\electrum\electrum\address_synchronizer.py", line 75, in <module>
    class AddressSynchronizer(Logger, EventListener):
  File "...\electrum\electrum\address_synchronizer.py", line 205, in AddressSynchronizer
    def on_event_blockchain_updated(self, *args):
  File "...\electrum\electrum\util.py", line 2005, in event_listener
    classname, method_name = func.__qualname__.split('.')
ValueError: too many values to unpack (expected 2)
```
2025-06-15 19:06:10 +00:00
..
2024-09-18 15:48:38 +00:00
2025-06-12 21:02:58 +02:00
2022-07-07 18:29:01 +02:00
2022-10-20 18:43:54 +00:00
2024-05-30 13:08:13 +00:00
2025-05-26 15:31:08 +00:00
2025-05-28 10:42:59 +02:00
2025-02-19 14:29:02 +01:00
2025-04-02 16:21:59 +00:00
2025-06-06 12:35:41 +02:00
2025-04-23 16:09:31 +02:00
2024-11-29 17:09:29 +08:00
2022-10-31 16:13:22 +00:00
2023-04-24 12:58:26 +00:00
2022-10-31 16:13:22 +00:00
2024-04-24 14:14:31 +00:00
2024-05-20 16:57:11 +02:00
2023-12-04 14:15:39 +08:00
2025-04-23 16:09:31 +02:00
2025-06-13 16:50:58 +00:00
2025-05-28 10:46:00 +02:00
2025-04-23 16:09:31 +02:00