Page MenuHomePhabricator

[test] fix intermittent issues in chronik_electrum_blockchain
ClosedPublic

Authored by PiRK on May 23 2025, 11:17.

Details

Summary

The test makes the incorrect assumptions that when a chain of 3 transactions involving the same scripthash is broadcast, the Electrum server will send 3 notifications.
In reality the server will queue 3 notifications, but when it computes the status of the indexed transactions for the first notification Chronik may already have indexed 2 or all 3 transactions. The Electrum server only actually sends the notification if the status changes, so if the first notificaton already accounts for the second transaction, it will not send out the second notification.

Fix this by actually waiting for the previous notification before sending the next transaction.

Test Plan

test/functional/test_runner.py --repeat 1000 chronik_electrum_blockchain

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik_elec_fix
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33408
Build 66295: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 66294: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.May 23 2025, 11:17
PiRK added inline comments.
test/functional/chronik_electrum_blockchain.py
1117

unused return value

This revision is now accepted and ready to land.May 23 2025, 11:52