Page MenuHomePhabricator

[chronik] Electrum: fix a potential deadlock in scripthash_or_address_suscribe
ClosedPublic

Authored by Fabien on Sep 1 2025, 09:04.

Details

Summary

Because the returned status is computed after the task is started, there could be a lock issue with the indexer if an event occurs while the status is being computed. This is most likely to occur with a large wallet but can in theory happen for any subscription.

Computing the status before creating the task solves this issue entirely.

Test Plan
./test/functional/test_runner.py chronik_*

Tested live against a watchonly IFP wallet.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable