bitcoin-util has no tests
See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%)
bitcoin-util has no tests
See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%)
Concept ACK
ACK fa84adab8c64fd626b111cfea220bf7606fa4d53 (jamesob/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util)
Built locally and ran ./test/util/bitcoin-util-test.py and played with ./src/bitcoin-util grind.
Changes look fine. Some nice import cleanups and minor code simplification.
<details><summary>Show signature data</summary> <p>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
ACK fa84adab8c64fd626b111cfea220bf7606fa4d53 ([`jamesob/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util))
Built locally and ran ./test/util/bitcoin-util-test.py and played with `./src/bitcoin-util grind`.
Changes look fine. Some nice import cleanups and minor code simplification.
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEGNRVI1NPYuZCSIrGepNdrbLETwUFAmDLgGsACgkQepNdrbLE
TwWFIxAAkDsuAmOwatxePesAqX4Y40jueFJRKhoZ6wgigxoV965S42AVxPQEOKeV
2M1LX0pLH5k4J1KkJuBPPh0SX+NNq4jRFAmOI2QYMXMaqK/qurPO/JTObT/M/YEZ
wVTl8wK7UJPesE71yf2KxtPgBv5bl+38HLa12S8+sZahpJ5e+sis+qXnDhEnod+o
Ljxi+36AvbVussuOkqbJoUxku6LfvCReQd4ilYww/9nuPT2r7fz5G7YehI95+QdR
u5j0xynvai0WvJDrLonZjcRfoCHOdQDZ16BDxvqyvLtlMdA0Jehh2YzK/4MQ3tWb
6JIDmHffNgTKUeEz5AE2X+PRDfVaqqFAJ0GtnrwYq6/tk6NXyJ5xkjHqW9QUwU6W
TIZC7E6zBWE9vHByLz4mh2ziFLGqJbVZSMJwkeOzqE+OPurOnDzcVPVgiJlVOklD
odmJwCCziQIGBFGTL2+BsEexqwMtnaUOJMOm84UlAMyrWMb7SBnyKKka4FtsAnVf
UbHJzckvPSCaQ6k0HNItzGfiqvSeQfzWbYhKJPe1MG1LwXVxHhRDuOpr7EC17IsC
Qc61guZ/U0Go3lmAQgnV/EHqea0XeeuD452pZizt/Qw/417b+JGbRjj0bknUx70b
KSW8JxPuyuoyA3ZZ8QIq2ZmWlLhpzRM6L5dKClxKteFwGv1iI54=
=q1fJ
-----END PGP SIGNATURE-----
</p></details>
<details><summary>Show platform data</summary> <p>
Tested on Linux-4.19.0-16-amd64-x86_64-with-glibc2.28
Configured with ./configure LDFLAGS=-L/home/james/src/bitcoin2/db4/lib/ CPPFLAGS=-I/home/james/src/bitcoin2/db4/include/ CXXFLAGS=-fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -Wsign-compare -Werror=thread-safety-analysis --enable-wallet --enable-debug --with-daemon --enable-natpmp-default
Compiled with /usr/bin/ccache /usr/local/bin/clang++ -std=c++17 -mavx -mavx2 -fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -Wsign-compare -Werror=thread-safety-analysis -O0 -g3 -ftrapv -fdebug-prefix-map=$(abs_srcdir)=. -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -msse4 -msha -msse4.1 -msse4.2 i
Compiler version: Debian clang version 11.1.0-++20210405104510+1fdec59bffc1-1~exp1~20210405085125.161
</p></details>
reACK https://github.com/bitcoin/bitcoin/pull/22270/commits/fa2edd9c18b87fa5b3edf3e9046787fe8974608c after examining range-diff.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
Concept ACK
Also fix incorrect {}Rebased due to silent merge conflict
Code review and tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce
<details> <summary> Tested with: </summary>
$ ./src/bitcoin-util -signet grind 00000020c9bd670f98b2fd23e609e831221b8fe9f8b9493956778bfc61674fa86d000000300eba3aca1b6ffe05d28bb9ccc37341911943effb9985df89bb0161e3436ef0d0bccd60a569011e95b32301
00000020c9bd670f98b2fd23e609e831221b8fe9f8b9493956778bfc61674fa86d000000300eba3aca1b6ffe05d28bb9ccc37341911943effb9985df89bb0161e3436ef0d0bccd60a569011e95b32301
$ ./src/bitcoin-util -version
Bitcoin Core bitcoin-util utility version v21.99.0-fa4017e7a089
$ ./src/bitcoin-util -help
Bitcoin Core bitcoin-util utility version v21.99.0-fa4017e7a089
...(help man)
</deatils>
Tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce (modulo first commit fa831e709a4d605a18e5de1627b48d670bb326fb, as I don't have a Windows / Visual Studio environment)
Reviewed the code changes, built locally, ran the introduced tests and grinded some early signet block headers, works as expected.
(modulo first commit fa831e7, as I don't have a Windows / Visual Studio environment)
I don't have Windows either, but the commit was required for the tests to pass on appveyor CI
reACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce (jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te)
Built locally, ran bitcoin-util tests.
<details><summary>Show signature data</summary> <p>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
reACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce ([`jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te))
Built locally, ran bitcoin-util tests.
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEGNRVI1NPYuZCSIrGepNdrbLETwUFAmDTnJkACgkQepNdrbLE
TwWViQ/6ArDUV5umNaPEu2IPKwTC4h1sExbyxZW7x/JQmG0qWWrENWLpl4kAqXFx
fh4wYd1OhQyTI6RB3pNnnLLzZOjlgTi3pZ2ufLsp+WKcYbRMBxOagveMj3700ju2
lSNaYnwvw5viFhBvHMnRRQHrCMRlHqC1cOZoLnktrFeF1P1wTGvfQUCE0siwAXaB
9sNOhoncX8SDwS4g29MdKy6geCTwPeXXbd3kkZUxxGoXTfz0hutD1p7rcHhrWj1/
zJTGepQmI+dinZDm3sWKdwgYPWrzGUAgNnxntpFevjWgI51KpSpN77HBPzy2RBZm
qear5Vku2W+M7x9Lt0sjPG3o10kQzzUFPpVYSueb0GqAdCHSdUDrko05TfBtj+/a
0QOlIl6UxN1oNrDLIbtUpFb+1HNsTfYmpeMe1ajXS/m2UsgH0V32hq85VFpcCzmv
0AGeLIqvg+9xNXH0I2/3Ldkexvb+BerZzCd188jxjnnEj6W7FuOlInVCexz7/GIq
W71CTM+xk4PPQim9eJOO5gEc4RMbKZvSqQ4ctQaU3v54+iyq/EO3hz9+4/D3VTnt
zYRkkjViU9h3z3sK1Ebl0d8wj1E87FOSR2EN7qieUd9t6yQa1u485ySGDu30CUnx
d9O+//Jz5wqzTYupF+zU//98CiPj3XNfS8wfqichkYg5epsDvs0=
=nBk0
-----END PGP SIGNATURE-----
</p></details>
<details><summary>Show platform data</summary> <p>
Tested on Linux-4.19.0-17-amd64-x86_64-with-glibc2.28
Configured with ./configure LDFLAGS=-L/home/james/src/bitcoin/db4/lib/ CPPFLAGS=-I/home/james/src/bitcoin/db4/include/ CXXFLAGS=-fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare --enable-wallet --with-daemon CXX=/usr/local/bin/clang++ CC=/usr/local/bin/clang --with-bignum=no PYTHONPATH= --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental --no-create --no-recursion
Compiled with /usr/bin/ccache /usr/local/bin/clang++ -std=c++17 -mavx -mavx2 -fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -fdebug-prefix-map=$(abs_srcdir)=. -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -msse4 -msha -msse4.1 -msse4.2 i
Compiler version: Debian clang version 11.1.0-++20210428103820+1fdec59bffc1-1~exp1~20210428204437.162
</p></details>