MY_SUBVERSION is defined in messages.py as a byte string, but here we were comparing this value to the value returned by the RPC. Convert to ensure the types match.
Backport of core#20522.
This is the fix to the occasional failures in p2p_add_connections that can be seen on CI.