Repository navigation
test: Add bitcoin-util tests (+refactors) - #22270
Conversation
9892372 to
fa97dac
Compare
848f055 to
fa84ada
Compare
|
Concept ACK |
fa84ada to
fa2edd9
Compare
jamesob
left a comment
There was a problem hiding this comment.
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.
Show signature data
-----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-----
Show platform data
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
|
reACK fa2edd9 after examining range-diff. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Concept ACK |
fa2edd9 to
5555dc9
Compare
Also fix incorrect {}
5555dc9 to
fa4017e
Compare
|
Rebased due to silent merge conflict |
klementtan
left a comment
There was a problem hiding this comment.
Code review and tested ACK fa4017e
Tested with:
$ ./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)
I don't have Windows either, but the commit was required for the tests to pass on appveyor CI |
jamesob
left a comment
There was a problem hiding this comment.
reACK fa4017e (jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te)
Built locally, ran bitcoin-util tests.
Show signature data
-----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-----
Show platform data
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
Some PRs ago (in #19937) the bitcoin-util binary was added, which we didn't notice and didn't rename to elements-util. This commit adds some tests for it, which made me notice it ... so rename it here.
bitcoin-util has no tests
See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%)