HomePhabricator

test: store subversion (user agent) as string in msg_version

Description

test: store subversion (user agent) as string in msg_version

Summary:

It seems more natural to treat the "subversion" field (=user agent string, see BIP 14) of a node as pure string rather than a bytestring within the test framework. This is also suggested with the naming prefix in msg_version.strSubVer: one probably wouldn't expect a field starting with "str" to be a bytestring that needs further decoding to be useful. This PR moves the encoding/decoding parts to the serialization/deserialization routines so that the user doesn't have to bother with that anymore.

This is a backport of core#20993

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10943

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Jan 23 2021, 14:04
PiRKCommitted on Jan 31 2022, 17:40
PiRKPushed on Jan 31 2022, 17:40
Reviewer
Restricted Project
Differential Revision
D10943: test: store subversion (user agent) as string in msg_version
Parents
rABC4885d0a59315: Add bounds checking to seeder arguments with integer base types
Branches
Unknown
Tags
Unknown