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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.May 23 2025, 11:17
PiRK added inline comments.
test/functional/chronik_electrum_blockchain.py
1117 ↗(On Diff #54138)

unused return value

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