Page MenuHomePhabricator

[refactor] add alias for Schnorr signatures and remove size magic number
ClosedPublic

Authored by majcosta on Sun, Feb 21, 10:12.

Details

Summary

Schnorr signatures repeat as std::array<uint8_t, 64> throughout the
code. this defines them in a single alias and replaces the magic number
with CPubKey::SCHNORR_SIZE

Test Plan
ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Tail of the build log:

[384/440] Running utility command for check-bitcoin-script_commitment_tests
[385/440] Running utility command for check-bitcoin-sighashtype_tests
[386/440] bitcoin: testing sync_tests
[387/440] bitcoin: testing torcontrol_tests
[388/440] Running utility command for check-bitcoin-sync_tests
[389/440] Running utility command for check-bitcoin-torcontrol_tests
[390/440] bitcoin: testing settings_tests
[391/440] Running utility command for check-bitcoin-settings_tests
[392/440] bitcoin: testing scriptpubkeyman_tests
[393/440] Running utility command for check-bitcoin-scriptpubkeyman_tests
[394/440] bitcoin: testing op_reversebytes_tests
[395/440] Running utility command for check-bitcoin-op_reversebytes_tests
[396/440] bitcoin: testing txvalidationcache_tests
[397/440] Running utility command for check-bitcoin-txvalidationcache_tests
[398/440] bitcoin: testing serialize_tests
[399/440] Running utility command for check-bitcoin-serialize_tests
[400/440] bitcoin: testing uint256_tests
[401/440] Running utility command for check-bitcoin-uint256_tests
[402/440] bitcoin: testing wallet_tests
[403/440] bitcoin: testing schnorr_tests
[404/440] bitcoin: testing walletdb_tests
[405/440] bitcoin: testing undo_tests
[406/440] Running utility command for check-bitcoin-wallet_tests
[407/440] Running utility command for check-bitcoin-schnorr_tests
[408/440] bitcoin: testing radix_tests
[409/440] Running utility command for check-bitcoin-walletdb_tests
[410/440] Running utility command for check-bitcoin-undo_tests
[411/440] Running utility command for check-bitcoin-radix_tests
[412/440] bitcoin: testing validation_chainstatemanager_tests
[413/440] bitcoin: testing cuckoocache_tests
[414/440] bitcoin: testing ismine_tests
[415/440] bitcoin: testing cashaddr_tests
[416/440] bitcoin: testing ref_tests
[417/440] Running utility command for check-bitcoin-ismine_tests
[418/440] Running utility command for check-bitcoin-validation_chainstatemanager_tests
[419/440] Running utility command for check-bitcoin-cashaddr_tests
[420/440] Running utility command for check-bitcoin-cuckoocache_tests
[421/440] Running utility command for check-bitcoin-ref_tests
[422/440] bitcoin: testing script_tests
[423/440] bitcoin: testing crypto_tests
[424/440] Running utility command for check-bitcoin-script_tests
[425/440] Running utility command for check-bitcoin-crypto_tests
[426/440] bitcoin: testing validation_tests
[427/440] Running utility command for check-bitcoin-validation_tests
[428/440] bitcoin: testing util_tests
[429/440] Running utility command for check-bitcoin-util_tests
[430/440] bitcoin: testing blockcheck_tests
[431/440] Running utility command for check-bitcoin-blockcheck_tests
[432/440] bitcoin: testing skiplist_tests
[433/440] Running utility command for check-bitcoin-skiplist_tests
[434/440] bitcoin: testing coinselector_tests
FAILED: src/test/CMakeFiles/check-bitcoin-coinselector_tests 
cd /work/abc-ci-builds/build-clang/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-clang/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-clang/test/log && /usr/bin/cmake -E env /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-clang/test/log/bitcoin-coinselector_tests.log /work/abc-ci-builds/build-clang/src/test/test_bitcoin --run_test=coinselector_tests --logger=HRF,message:JUNIT,message,bitcoin-coinselector_tests.xml --catch_system_errors=no
Segmentation fault (core dumped)
[435/440] bitcoin: testing transaction_tests
[436/440] Running utility command for check-bitcoin-transaction_tests
[437/440] bitcoin: testing coins_tests
[438/440] Running utility command for check-bitcoin-coins_tests
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

couldn't reproduce with for i in {1..100}; do ninja check-bitcoin-coinselector_tests; done, rebasing

PiRK added a subscriber: PiRK.

Good stuff.

This revision is now accepted and ready to land.Mon, Feb 22, 07:38