<!-- Needs the label "good first issue" assigned manually before or after opening -->

<!-- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution -->

<!-- Motivate the issue and explain the solution briefly -->
Right now in the functional test framework, conversions from hex-string to bytes and vice-versa are done in different ways:
- convert `bytes_obj` to hex-string: binascii.hexlify(bytes_obj), bytes_obj.hex()
- convert `hex_str` to bytes object: binascii.unhexlify(hex_str), binascii.a2b_hex(hex_str), bytes.fromhex(hex_str)

For consistency reasons, only the built-in way of using `bytes` (class) methods should be used (see also MarcoFalke's comment https://github.com/bitcoin/bitcoin/pull/22593#issuecomment-890918620):
- bytes.fromhex() (https://docs.python.org/3.7/library/stdtypes.html#bytes.fromhex)
- bytes.hex() (https://docs.python.org/3.7/library/stdtypes.html#bytes.hex)

This seems to be the most natural and modern way to do it, without a need to import any libraries, and the other ones using binascii should be replaced by those. As an example, see PR #22593 which replaced a helper `hex_str_to_bytes` (which in turn used binascii.unhexlify) with `bytes.fromhex()`. For quickly identifying instances the command `git grep binascii` can be used, though one would need to check that there is maybe uses of binascii that are still legit.

#### Useful skills:
- Python 3 basic skills, knowledge of fundamental data types string and bytes

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

#include <hash.h>
#include <test/util/setup_common.h>
#include <util/serfloat.h>
#include <serialize.h>
#include <streams.h>
#include <boost/test/unit_test.hpp>
#include <cmath>
#include <limits>
BOOST_FIXTURE_TEST_SUITE(serfloat_tests, BasicTestingSetup)
namespace {
uint64_t TestDouble(double f) {
    uint64_t i = EncodeDouble(f);
    double f2 = DecodeDouble(i);
    if (std::isnan(f)) {
        
        BOOST_CHECK(std::isnan(f2));
    } else {
        
        BOOST_CHECK(!std::isnan(f2));
        uint64_t i2 = EncodeDouble(f2);
        BOOST_CHECK_EQUAL(f, f2);
        BOOST_CHECK_EQUAL(i, i2);
    }
    return i;
}
} 
BOOST_AUTO_TEST_CASE(double_serfloat_tests) {