Page MenuHomePhabricator

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

Authored by Fabien on Thu, May 15, 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.Thu, May 15, 15:13