Skip to content

Commit 8ee791e

Browse files
committed
Add BIP352 test vectors as unit tests
Use the test vectors to test sending and receiving. A few cases are not covered here, namely anything that requires testing specific to the wallet. For example: * Taproot script path spending is not tested, as that is better tested in a wallets coin selection / signing logic * Re-computing outputs during RBF is not tested, as that is better tested in a wallets RBF logic The unit tests are written in such a way that adding new test cases is as easy as updating the JSON file. Also adds a comparator to `CRecipient`, to make testing easier.
1 parent 8be9116 commit 8ee791e

File tree

4 files changed

+1917
-0
lines changed

4 files changed

+1917
-0
lines changed

src/Makefile.test.include

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ FUZZ_BINARY=test/fuzz/fuzz$(EXEEXT)
1717
JSON_TEST_FILES = \
1818
test/data/script_tests.json \
1919
test/data/bip341_wallet_vectors.json \
20+
test/data/bip352_send_and_receive_vectors.json \
2021
test/data/base58_encode_decode.json \
2122
test/data/blockfilters.json \
2223
test/data/key_io_valid.json \
@@ -182,6 +183,7 @@ BITCOIN_TESTS += \
182183
wallet/test/ismine_tests.cpp \
183184
wallet/test/rpc_util_tests.cpp \
184185
wallet/test/scriptpubkeyman_tests.cpp \
186+
wallet/test/silentpayment_tests.cpp \
185187
wallet/test/walletload_tests.cpp \
186188
wallet/test/group_outputs_tests.cpp
187189

0 commit comments

Comments
 (0)