Page MenuHomePhabricator

[chronik] Electrum: handle multiple messages in a single packet in the test framework
ClosedPublic

Authored by Fabien on May 15 2025, 14:30.

Details

Summary

It is possible for the server to send several '\n' separated messages in a single data frame. This diff adds support for this. For the current tests there is no change in behavior.

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
electrrum_multimessage
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33322
Build 66125: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 66124: arc lint + arc unit

Event Timeline

PiRK added inline comments.
test/functional/test_framework/jsonrpctools.py
120–129 ↗(On Diff #54009)

I probably doesn't matter much for the tests, but we could implement this a bit more efficiently by avoiding the split/join round trip.

See https://www.w3schools.com/python/trypython.asp?filename=demo_ref_string_split4
(untested)

This revision is now accepted and ready to land.May 15 2025, 15:13