2016-09-29 07:57:47 +02:00
|
|
|
# Copyright (c) 2013-2016 The Bitcoin Core developers
|
2018-01-12 16:11:18 +01:00
|
|
|
# Copyright (c) 2014-2018 The Dash Core developers
|
2016-09-29 07:57:47 +02:00
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2021-08-11 05:20:43 +02:00
|
|
|
if ENABLE_FUZZ
|
2022-09-19 09:03:12 +02:00
|
|
|
noinst_PROGRAMS += test/fuzz/fuzz
|
2019-01-16 17:49:01 +01:00
|
|
|
else
|
|
|
|
bin_PROGRAMS += test/test_dash
|
2021-08-11 05:20:43 +02:00
|
|
|
endif
|
|
|
|
|
2014-05-28 19:38:41 +02:00
|
|
|
TEST_SRCDIR = test
|
2015-04-03 00:51:08 +02:00
|
|
|
TEST_BINARY=test/test_dash$(EXEEXT)
|
2022-09-19 09:03:12 +02:00
|
|
|
FUZZ_BINARY=test/fuzz/fuzz$(EXEEXT)
|
2014-05-28 19:38:41 +02:00
|
|
|
|
|
|
|
JSON_TEST_FILES = \
|
2018-08-26 16:57:01 +02:00
|
|
|
test/data/blockfilters.json \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/data/base58_encode_decode.json \
|
2017-05-29 13:51:40 +02:00
|
|
|
test/data/bip39_vectors.json \
|
Merge #11372: Address encoding cleanup
92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille)
119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille)
ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille)
32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille)
Pull request description:
This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting.
This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic.
Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
Make linter happy
Dashify
2018-03-07 00:04:56 +01:00
|
|
|
test/data/key_io_valid.json \
|
|
|
|
test/data/key_io_invalid.json \
|
2018-02-27 14:39:48 +01:00
|
|
|
test/data/proposals_valid.json \
|
|
|
|
test/data/proposals_invalid.json \
|
Merge #11372: Address encoding cleanup
92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille)
119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille)
ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille)
32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille)
Pull request description:
This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting.
This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic.
Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
Make linter happy
Dashify
2018-03-07 00:04:56 +01:00
|
|
|
test/data/script_tests.json \
|
|
|
|
test/data/sighash.json \
|
2022-03-06 07:54:26 +01:00
|
|
|
test/data/trivially_invalid.json \
|
|
|
|
test/data/trivially_valid.json \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/data/tx_invalid.json \
|
Merge #11372: Address encoding cleanup
92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille)
119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille)
ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille)
32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille)
Pull request description:
This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting.
This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic.
Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
Make linter happy
Dashify
2018-03-07 00:04:56 +01:00
|
|
|
test/data/tx_valid.json
|
2014-05-28 19:38:41 +02:00
|
|
|
|
2021-05-11 17:11:07 +02:00
|
|
|
RAW_TEST_FILES = \
|
|
|
|
test/data/asmap.raw
|
2014-05-28 19:38:41 +02:00
|
|
|
|
|
|
|
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
|
|
|
|
|
2018-04-10 14:24:05 +02:00
|
|
|
BITCOIN_TEST_SUITE = \
|
2021-08-11 06:18:40 +02:00
|
|
|
test/main.cpp \
|
2019-11-21 21:13:08 +01:00
|
|
|
$(TEST_UTIL_H)
|
2018-04-10 14:24:05 +02:00
|
|
|
|
2021-08-11 06:18:40 +02:00
|
|
|
FUZZ_SUITE_LD_COMMON = \
|
|
|
|
$(LIBBITCOIN_SERVER) \
|
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_UTIL) \
|
2022-09-20 10:32:09 +02:00
|
|
|
$(LIBTEST_FUZZ) \
|
2019-11-21 21:13:08 +01:00
|
|
|
$(LIBTEST_UTIL) \
|
2021-08-11 06:18:40 +02:00
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
|
|
|
$(LIBBITCOIN_WALLET) \
|
2022-02-27 20:05:36 +01:00
|
|
|
$(LIBBITCOIN_CLI) \
|
2021-08-11 06:18:40 +02:00
|
|
|
$(BDB_LIBS) \
|
|
|
|
$(LIBUNIVALUE) \
|
|
|
|
$(LIBLEVELDB) \
|
|
|
|
$(LIBLEVELDB_SSE42) \
|
|
|
|
$(BOOST_LIBS) \
|
|
|
|
$(LIBMEMENV) \
|
|
|
|
$(LIBSECP256K1) \
|
|
|
|
$(EVENT_LIBS) \
|
|
|
|
$(EVENT_PTHREADS_LIBS) \
|
|
|
|
$(BLS_LIBS) \
|
2022-02-27 19:19:33 +01:00
|
|
|
$(GMP_LIBS) \
|
2021-08-11 06:18:40 +02:00
|
|
|
$(BACKTRACE_LIB)
|
|
|
|
|
2019-08-25 07:17:19 +02:00
|
|
|
# test_dash binary #
|
2014-05-28 19:38:41 +02:00
|
|
|
BITCOIN_TESTS =\
|
2014-12-15 10:22:19 +01:00
|
|
|
test/arith_uint256_tests.cpp \
|
2015-11-25 13:19:48 +01:00
|
|
|
test/scriptnum10.h \
|
2015-09-22 21:24:16 +02:00
|
|
|
test/addrman_tests.cpp \
|
2016-03-21 12:25:13 +01:00
|
|
|
test/amount_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/allocator_tests.cpp \
|
|
|
|
test/base32_tests.cpp \
|
|
|
|
test/base58_tests.cpp \
|
|
|
|
test/base64_tests.cpp \
|
2020-12-25 05:33:37 +01:00
|
|
|
test/bech32_tests.cpp \
|
2015-04-23 13:20:18 +02:00
|
|
|
test/bip32_tests.cpp \
|
2017-05-29 13:51:40 +02:00
|
|
|
test/bip39_tests.cpp \
|
2021-12-11 21:01:20 +01:00
|
|
|
test/block_reward_reallocation_tests.cpp \
|
Merge #11748: [Tests] Adding unit tests for GetDifficulty in blockchain.cpp.
3e1ee31 [Tests] Adding unit tests for GetDifficulty in blockchain.cpp. (sean)
Pull request description:
blockchain.cpp has low unit test coverage. This commit is intended
to start improving its code coverage to reasonable levels. One or more
follow up commits will complete the task that this commit is starting
(though the usefulness of this commit is not dependent upon later
commits).
Note that these tests were not written based upon a specification of how
GetDifficulty *should* work, but rather how it actually *does* work. As
a result, if there are any bugs in the current GetDifficulty
implementation, these unit tests serve to lock them in rather than
expose them.
-- Why has blockchain.cpp been modified if this is a unit testing change?
Since the existing GetDifficulty function relies on a global variable,
chainActive, it was not suitable for unit testing purposes. Both the
existing GetDifficulty function and the unit tests now call through to
a new, more modular version of GetDifficulty that can work on any chain,
not just chainActive.
-- Why does blockchain_tests.cpp directly include blockchain.cpp instead
of blockchain.h?
While the new GetDifficulty function's signature is arguably better than
the old one's, it still isn't great, and doesn't seem to warrant inclusion
as part of the blockchain.h API, especially since only test code is
directly using it. If a better way of exposing the new GetDifficulty
function to unit tests exists, please mention it and the commit will be
updated accordingly.
-- Why is the test fixture named blockchain_difficulty_tests rather than
blockchain_tests?
The Bitcoin Core policy for naming unit test files is to match the the
file under test ("blockchain" becomes "blockchain_tests"). While this
commit complies with that, blockchain.cpp is a massive file, such that
having all of the unit tests in one file will tend towards disorder.
Since there will be a lot more tests added to this file, the intention
is to divide up different types of tests into different test fixtures
within the same file.
Tree-SHA512: a7dda9c2a9414d4819b4d2911f5637891dc19cecbecfc1463846161d2a78793151927a5ab911c69a5d3013f7668e75a1d78a65667cb9d83910cda439cbe84d62
2017-12-23 11:15:18 +01:00
|
|
|
test/blockchain_tests.cpp \
|
Backport compact blocks functionality from bitcoin (#1966)
* Merge #8068: Compact Blocks
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo)
ccd06b9 Elaborate bucket size math (Pieter Wuille)
0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo)
8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo)
678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo)
56ba516 Add reconstruction debug logging (Matt Corallo)
2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo)
927f8ee Add ability to fetch CNode by NodeId (Matt Corallo)
d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
00c4078 Add protocol messages for short-ids blocks (Matt Corallo)
e3b2222 Add some blockencodings tests (Matt Corallo)
f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo)
85ad31e Add partial-block block encodings API (Matt Corallo)
5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo)
cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo)
7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo)
96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
* Merge #8408: Prevent fingerprinting, disk-DoS with compact blocks
1d06e49 Ignore CMPCTBLOCK messages for pruned blocks (Suhas Daftuar)
1de2a46 Ignore GETBLOCKTXN requests for unknown blocks (Suhas Daftuar)
* Merge #8418: Add tests for compact blocks
45c7ddd Add p2p test for BIP 152 (compact blocks) (Suhas Daftuar)
9a22a6c Add support for compactblocks to mininode (Suhas Daftuar)
a8689fd Tests: refactor compact size serialization in mininode (Suhas Daftuar)
9c8593d Implement SipHash in Python (Pieter Wuille)
56c87e9 Allow changing BIP9 parameters on regtest (Suhas Daftuar)
* Merge #8505: Trivial: Fix typos in various files
1aacfc2 various typos (leijurv)
* Merge #8449: [Trivial] Do not shadow local variable, cleanup
a159f25 Remove redundand (and shadowing) declaration (Pavel Janík)
cce3024 Do not shadow local variable, cleanup (Pavel Janík)
* Merge #8739: [qa] Fix broken sendcmpct test in p2p-compactblocks.py
157254a Fix broken sendcmpct test in p2p-compactblocks.py (Suhas Daftuar)
* Merge #8854: [qa] Fix race condition in p2p-compactblocks test
b5fd666 [qa] Fix race condition in p2p-compactblocks test (Suhas Daftuar)
* Merge #8393: Support for compact blocks together with segwit
27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 (Suhas Daftuar)
422fac6 [qa] Add support for compactblocks v2 to mininode (Suhas Daftuar)
f5b9b8f [qa] Fix bug in mininode witness deserialization (Suhas Daftuar)
6aa28ab Use cmpctblock type 2 for segwit-enabled transfer (Pieter Wuille)
be7555f Fix overly-prescriptive p2p-segwit test for new fetch logic (Matt Corallo)
06128da Make GetFetchFlags always request witness objects from witness peers (Matt Corallo)
* Merge #8882: [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py
b55d941 [qa] Fix race condition in sendheaders.py (Suhas Daftuar)
6976db2 [qa] Another attempt to fix race condition in p2p-compactblocks.py (Suhas Daftuar)
* Merge #8904: [qa] Fix compact block shortids for a test case
4cdece4 [qa] Fix compact block shortids for a test case (Dagur Valberg Johannsson)
* Merge #8637: Compact Block Tweaks (rebase of #8235)
3ac6de0 Align constant names for maximum compact block / blocktxn depth (Pieter Wuille)
b2e93a3 Add cmpctblock to debug help list (instagibbs)
fe998e9 More agressively filter compact block requests (Matt Corallo)
02a337d Dont remove a "preferred" cmpctblock peer if they provide a block (Matt Corallo)
* Merge #8975: Chainparams: Trivial: In AppInit2(), s/Params()/chainparams/
6f2f639 Chainparams: Trivial: In AppInit2(), s/Params()/chainparams/ (Jorge Timón)
* Merge #8968: Don't hold cs_main when calling ProcessNewBlock from a cmpctblock
72ca7d9 Don't hold cs_main when calling ProcessNewBlock from a cmpctblock (Matt Corallo)
* Merge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing
dfe7906 Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
* Merge #8515: A few mempool removal optimizations
0334430 Add some missing includes (Pieter Wuille)
4100499 Return shared_ptr<CTransaction> from mempool removes (Pieter Wuille)
51f2783 Make removed and conflicted arguments optional to remove (Pieter Wuille)
f48211b Bypass removeRecursive in removeForReorg (Pieter Wuille)
* Merge #9026: Fix handling of invalid compact blocks
d4833ff Bump the protocol version to distinguish new banning behavior. (Suhas Daftuar)
88c3549 Fix compact block handling to not ban if block is invalid (Suhas Daftuar)
c93beac [qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
* Merge #9039: Various serialization simplifcations and optimizations
d59a518 Use fixed preallocation instead of costly GetSerializeSize (Pieter Wuille)
25a211a Add optimized CSizeComputer serializers (Pieter Wuille)
a2929a2 Make CSerAction's ForRead() constexpr (Pieter Wuille)
a603925 Avoid -Wshadow errors (Pieter Wuille)
5284721 Get rid of nType and nVersion (Pieter Wuille)
657e05a Make GetSerializeSize a wrapper on top of CSizeComputer (Pieter Wuille)
fad9b66 Make nType and nVersion private and sometimes const (Pieter Wuille)
c2c5d42 Make streams' read and write return void (Pieter Wuille)
50e8a9c Remove unused ReadVersion and WriteVersion (Pieter Wuille)
* Merge #9058: Fixes for p2p-compactblocks.py test timeouts on travis (#8842)
dac53b5 Modify getblocktxn handler not to drop requests for old blocks (Russell Yanofsky)
55bfddc [qa] Fix stale data bug in test_compactblocks_not_at_tip (Russell Yanofsky)
47e9659 [qa] Fix bug in compactblocks v2 merge (Russell Yanofsky)
* Merge #9160: [trivial] Fix hungarian variable name
ec34648 [trivial] Fix hungarian variable name (Russell Yanofsky)
* Merge #9159: [qa] Wait for specific block announcement in p2p-compactblocks
dfa44d1 [qa] Wait for specific block announcement in p2p-compactblocks (Russell Yanofsky)
* Merge #9125: Make CBlock a vector of shared_ptr of CTransactions
b4e4ba4 Introduce convenience type CTransactionRef (Pieter Wuille)
1662b43 Make CBlock::vtx a vector of shared_ptr<CTransaction> (Pieter Wuille)
da60506 Add deserializing constructors to CTransaction and CMutableTransaction (Pieter Wuille)
0e85204 Add serialization for unique_ptr and shared_ptr (Pieter Wuille)
* Merge #8872: Remove block-request logic from INV message processing
037159c Remove block-request logic from INV message processing (Matt Corallo)
3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo)
d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
* Merge #9199: Always drop the least preferred HB peer when adding a new one.
ca8549d Always drop the least preferred HB peer when adding a new one. (Gregory Maxwell)
* Merge #9233: Fix some typos
15fa95d Fix some typos (fsb4000)
* Merge #9260: Mrs Peacock in The Library with The Candlestick (killed main.{h,cpp})
76faa3c Rename the remaining main.{h,cpp} to validation.{h,cpp} (Matt Corallo)
e736772 Move network-msg-processing code out of main to its own file (Matt Corallo)
87c35f5 Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo)
* Merge #9014: Fix block-connection performance regression
dd0df81 Document ConnectBlock connectTrace postconditions (Matt Corallo)
2d6e561 Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo)
2736c44 Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo)
ae4db44 Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo)
fd9d890 Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo)
6fdd43b Add struct to track block-connect-time-generated info for callbacks (Matt Corallo)
* Merge #9240: Remove txConflicted
a874ab5 remove internal tracking of mempool conflicts for reporting to wallet (Alex Morcos)
bf663f8 remove external usage of mempool conflict tracking (Alex Morcos)
* Merge #9344: Do not run functions with necessary side-effects in assert()
da9cdd2 Do not run functions with necessary side-effects in assert() (Gregory Maxwell)
* Merge #9273: Remove unused CDiskBlockPos* argument from ProcessNewBlock
a13fa4c Remove unused CDiskBlockPos* argument from ProcessNewBlock (Matt Corallo)
* Merge #9352: Attempt reconstruction from all compact block announcements
813ede9 [qa] Update compactblocks test for multi-peer reconstruction (Suhas Daftuar)
7017298 Allow compactblock reconstruction when block is in flight (Suhas Daftuar)
* Merge #9252: Release cs_main before calling ProcessNewBlock, or processing headers (cmpctblock handling)
bd02bdd Release cs_main before processing cmpctblock as header (Suhas Daftuar)
680b0c0 Release cs_main before calling ProcessNewBlock (cmpctblock handling) (Suhas Daftuar)
* Merge #9283: A few more CTransactionRef optimizations
91335ba Remove unused MakeTransactionRef overloads (Pieter Wuille)
6713f0f Make FillBlock consume txn_available to avoid shared_ptr copies (Pieter Wuille)
62607d7 Convert COrphanTx to keep a CTransactionRef (Pieter Wuille)
c44e4c4 Make AcceptToMemoryPool take CTransactionRef (Pieter Wuille)
* Merge #9375: Relay compact block messages prior to full block connection
02ee4eb Make most_recent_compact_block a pointer to a const (Matt Corallo)
73666ad Add comment to describe callers to ActivateBestChain (Matt Corallo)
962f7f0 Call ActivateBestChain without cs_main/with most_recent_block (Matt Corallo)
0df777d Use a temp pindex to avoid a const_cast in ProcessNewBlockHeaders (Matt Corallo)
c1ae4fc Avoid holding cs_most_recent_block while calling ReadBlockFromDisk (Matt Corallo)
9eb67f5 Ensure we meet the BIP 152 old-relay-types response requirements (Matt Corallo)
5749a85 Cache most-recently-connected compact block (Matt Corallo)
9eaec08 Cache most-recently-announced block's shared_ptr (Matt Corallo)
c802092 Relay compact block messages prior to full block connection (Matt Corallo)
6987219 Add a CValidationInterface::NewPoWValidBlock callback (Matt Corallo)
180586f Call AcceptBlock with the block's shared_ptr instead of CBlock& (Matt Corallo)
8baaba6 [qa] Avoid race in preciousblock test. (Matt Corallo)
9a0b2f4 [qa] Make compact blocks test construction using fetch methods (Matt Corallo)
8017547 Make CBlockIndex*es in net_processing const (Matt Corallo)
* Merge #9486: Make peer=%d log prints consistent
e6111b2 Make peer id logging consistent ("peer=%d" instead of "peer %d") (Matt Corallo)
* Merge #9400: Set peers as HB peers upon full block validation
d4781ac Set peers as HB peers upon full block validation (Gregory Sanders)
* Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for compact-block-reconstruction
c594580 Add braces around AddToCompactExtraTransactions (Matt Corallo)
1ccfe9b Clarify comment about mempool/extra conflicts (Matt Corallo)
fac4c78 Make PartiallyDownloadedBlock::InitData's second param const (Matt Corallo)
b55b416 Add extra_count lower bound to compact reconstruction debug print (Matt Corallo)
863edb4 Consider all (<100k memusage) txn for compact-block-extra-txn cache (Matt Corallo)
7f8c8ca Consider all orphan txn for compact-block-extra-txn cache (Matt Corallo)
93380c5 Use replaced transactions in compact block reconstruction (Matt Corallo)
1531652 Keep shared_ptrs to recently-replaced txn for compact blocks (Matt Corallo)
edded80 Make ATMP optionally return the CTransactionRefs it replaced (Matt Corallo)
c735540 Move ORPHAN constants from validation.h to net_processing.h (Matt Corallo)
* Merge #9587: Do not shadow local variable named `tx`.
44f2baa Do not shadow local variable named `tx`. (Pavel Janík)
* Merge #9510: [trivial] Fix typos in comments
cc16d99 [trivial] Fix typos in comments (practicalswift)
* Merge #9604: [Trivial] add comment about setting peer as HB peer.
dd5b011 [Trivial] add comment about setting peer as HB peer. (John Newbery)
* Fix using of AcceptToMemoryPool in PrivateSend code
* add `override`
* fSupportsDesiredCmpctVersion
* bring back tx ressurection in DisconnectTip
* Fix delayed headers
* Remove unused CConnman::FindNode overload
* Fix typos and comments
* Fix minor code differences
* Don't use rejection cache for corrupted transactions
Partly based on https://github.com/bitcoin/bitcoin/pull/8525
* Backport missed cs_main locking changes
Missed from https://github.com/bitcoin/bitcoin/commit/58a215ce8c13b900cf982c39f8ee4879290d1a95
* Backport missed comments and mapBlockSource.emplace call
Missed from two commits:
https://github.com/bitcoin/bitcoin/commit/88c35491ab19f9afdf9b3fa9356a072f70ef2f55
https://github.com/bitcoin/bitcoin/commit/7c98ce584ec23bcddcba8cdb33efa6547212f6ef
* Add CheckPeerHeaders() helper and check in (nCount == 0) too
2018-04-11 13:06:01 +02:00
|
|
|
test/blockencodings_tests.cpp \
|
2018-08-26 16:57:01 +02:00
|
|
|
test/blockfilter_tests.cpp \
|
2021-08-12 09:04:28 +02:00
|
|
|
test/blockfilter_index_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/bloom_tests.cpp \
|
2019-02-04 19:58:28 +01:00
|
|
|
test/bls_tests.cpp \
|
2017-02-28 10:00:02 +01:00
|
|
|
test/bswap_tests.cpp \
|
2021-01-13 21:45:04 +01:00
|
|
|
test/checkdatasig_tests.cpp \
|
2017-03-14 12:22:54 +01:00
|
|
|
test/checkqueue_tests.cpp \
|
2016-11-13 18:52:34 +01:00
|
|
|
test/cachemap_tests.cpp \
|
|
|
|
test/cachemultimap_tests.cpp \
|
2014-09-17 01:27:06 +02:00
|
|
|
test/coins_tests.cpp \
|
2019-06-05 14:31:45 +02:00
|
|
|
test/compilerbug_tests.cpp \
|
2014-10-31 09:36:30 +01:00
|
|
|
test/compress_tests.cpp \
|
2014-05-31 22:01:42 +02:00
|
|
|
test/crypto_tests.cpp \
|
2016-12-15 02:48:56 +01:00
|
|
|
test/cuckoocache_tests.cpp \
|
2018-06-12 14:02:14 +02:00
|
|
|
test/denialofservice_tests.cpp \
|
2021-01-13 21:45:04 +01:00
|
|
|
test/dip0020opcodes_tests.cpp \
|
2021-07-20 17:59:35 +02:00
|
|
|
test/descriptor_tests.cpp \
|
2021-12-11 21:01:20 +01:00
|
|
|
test/dynamic_activation_thresholds_tests.cpp \
|
2018-08-22 12:39:41 +02:00
|
|
|
test/evo_deterministicmns_tests.cpp \
|
2022-03-13 21:56:10 +01:00
|
|
|
test/evo_instantsend_tests.cpp \
|
2018-08-22 12:39:41 +02:00
|
|
|
test/evo_simplifiedmns_tests.cpp \
|
2022-03-06 07:54:26 +01:00
|
|
|
test/evo_trivialvalidation.cpp \
|
2022-04-16 16:46:04 +02:00
|
|
|
test/evo_utils_tests.cpp \
|
2021-08-12 09:02:29 +02:00
|
|
|
test/flatfile_tests.cpp \
|
2018-08-04 15:27:38 +02:00
|
|
|
test/fs_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/getarg_tests.cpp \
|
2017-06-26 15:56:29 +02:00
|
|
|
test/governance_validators_tests.cpp \
|
2014-04-20 17:36:25 +02:00
|
|
|
test/hash_tests.cpp \
|
Merge #11372: Address encoding cleanup
92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille)
119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille)
ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille)
32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille)
Pull request description:
This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting.
This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic.
Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
Make linter happy
Dashify
2018-03-07 00:04:56 +01:00
|
|
|
test/key_io_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/key_tests.cpp \
|
2021-01-13 21:45:04 +01:00
|
|
|
test/lcg.h \
|
2015-08-17 18:07:47 +02:00
|
|
|
test/limitedmap_tests.cpp \
|
2022-09-06 19:32:53 +02:00
|
|
|
test/llmq_dkg_tests.cpp \
|
2019-09-19 19:59:49 +02:00
|
|
|
test/logging_tests.cpp \
|
2015-10-23 03:33:06 +02:00
|
|
|
test/dbwrapper_tests.cpp \
|
2021-08-11 06:18:40 +02:00
|
|
|
test/validation_tests.cpp \
|
2015-03-25 18:13:09 +01:00
|
|
|
test/mempool_tests.cpp \
|
2015-11-17 17:35:44 +01:00
|
|
|
test/merkle_tests.cpp \
|
2017-10-03 14:26:05 +02:00
|
|
|
test/merkleblock_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/miner_tests.cpp \
|
|
|
|
test/multisig_tests.cpp \
|
2017-07-05 02:40:22 +02:00
|
|
|
test/net_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/netbase_tests.cpp \
|
|
|
|
test/pmt_tests.cpp \
|
2014-08-26 22:28:32 +02:00
|
|
|
test/policyestimator_tests.cpp \
|
2015-02-21 13:57:44 +01:00
|
|
|
test/pow_tests.cpp \
|
2015-10-29 07:11:24 +01:00
|
|
|
test/prevector_tests.cpp \
|
2017-01-05 11:10:40 +01:00
|
|
|
test/raii_event_tests.cpp \
|
2017-04-24 14:02:12 +02:00
|
|
|
test/random_tests.cpp \
|
2016-12-14 16:28:55 +01:00
|
|
|
test/ratecheck_tests.cpp \
|
2022-04-23 09:46:44 +02:00
|
|
|
test/ref_tests.cpp \
|
2015-09-03 18:53:00 +02:00
|
|
|
test/reverselock_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/rpc_tests.cpp \
|
2015-01-06 03:39:40 +01:00
|
|
|
test/sanity_tests.cpp \
|
2015-04-10 16:31:02 +02:00
|
|
|
test/scheduler_tests.cpp \
|
2018-06-12 14:02:14 +02:00
|
|
|
test/script_p2sh_tests.cpp \
|
2020-07-07 18:27:55 +02:00
|
|
|
test/script_p2pk_tests.cpp \
|
|
|
|
test/script_p2pkh_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/script_tests.cpp \
|
2017-09-21 22:15:34 +02:00
|
|
|
test/script_standard_tests.cpp \
|
2014-10-31 09:36:30 +01:00
|
|
|
test/scriptnum_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/serialize_tests.cpp \
|
2022-06-02 22:25:16 +02:00
|
|
|
test/settings_tests.cpp \
|
2014-10-31 09:36:30 +01:00
|
|
|
test/sighash_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/sigopcount_tests.cpp \
|
2014-06-29 15:26:58 +02:00
|
|
|
test/skiplist_tests.cpp \
|
2021-12-11 21:00:27 +01:00
|
|
|
test/specialtx_tests.cpp \
|
2015-09-08 00:22:23 +02:00
|
|
|
test/streams_tests.cpp \
|
2018-04-11 13:06:27 +02:00
|
|
|
test/subsidy_tests.cpp \
|
2017-11-08 21:28:35 +01:00
|
|
|
test/sync_tests.cpp \
|
2021-06-24 19:54:20 +02:00
|
|
|
test/util_threadnames_tests.cpp \
|
2014-08-20 13:53:42 +02:00
|
|
|
test/timedata_tests.cpp \
|
2017-05-18 19:58:34 +02:00
|
|
|
test/torcontrol_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/transaction_tests.cpp \
|
2021-05-25 12:48:04 +02:00
|
|
|
test/txindex_tests.cpp \
|
2017-11-20 21:19:19 +01:00
|
|
|
test/txvalidation_tests.cpp \
|
2015-03-03 15:59:32 +01:00
|
|
|
test/txvalidationcache_tests.cpp \
|
2014-05-28 19:38:41 +02:00
|
|
|
test/uint256_tests.cpp \
|
2021-04-14 02:15:23 +02:00
|
|
|
test/util_tests.cpp \
|
|
|
|
test/validation_block_tests.cpp \
|
2022-04-03 16:43:18 +02:00
|
|
|
test/validation_chainstate_tests.cpp \
|
2022-04-03 16:41:38 +02:00
|
|
|
test/validation_chainstatemanager_tests.cpp \
|
2021-10-10 12:57:35 +02:00
|
|
|
test/validation_flush_tests.cpp \
|
2021-04-14 02:15:23 +02:00
|
|
|
test/versionbits_tests.cpp
|
2014-05-28 19:38:41 +02:00
|
|
|
|
|
|
|
if ENABLE_WALLET
|
|
|
|
BITCOIN_TESTS += \
|
2021-03-17 23:36:11 +01:00
|
|
|
wallet/test/coinjoin_tests.cpp \
|
2019-01-31 18:01:30 +01:00
|
|
|
wallet/test/db_tests.cpp \
|
2021-07-13 18:30:17 +02:00
|
|
|
wallet/test/psbt_wallet_tests.cpp \
|
2015-02-03 21:09:47 +01:00
|
|
|
wallet/test/wallet_tests.cpp \
|
Backport bitcoin#10637 (partial) (#3878)
* Calculate and store the number of bytes required to spend an input
* Store effective value, fee, and long term fee in CInputCoin
Have CInputCOin store effective value information. This includes the effective
value itself, the fee, and the long term fee for the input
* Implement Branch and Bound coin selection in a new file
Create a new file for coin selection logic and implement the BnB algorithm in it.
* Move output eligibility to a separate function
* Use a struct for output eligibility
Instead of specifying 3 parameters, use a struct for those parameters
in order to reduce the number of arguments to SelectCoinsMinConf.
* Remove coinselection.h -> wallet.h circular dependency
Changes CInputCoin to coinselection and to use CTransactionRef in
order to avoid a circular dependency. Also moves other coin selection
specific variables out of wallet.h to coinselectoin.h
* Add tests for the Branch and Bound algorithm
* Move current coin selection algorithm to coinselection.{cpp,h}
Moves the current coin selection algorithm out of SelectCoinsMinConf
and puts it in coinselection.{cpp,h}. The new function, KnapsackSolver,
instead of taking a vector of COutputs, will take a vector of CInputCoins
that is prepared by SelectCoinsMinConf.
* Move original knapsack solver tests to coinselector_tests.cpp
* Add a GetMinimumFeeRate function which is wrapped by GetMinimumFee
* Have SelectCoinsMinConf and SelectCoins use BnB or Knapsack and use it (partial)
Allows SelectCoinsMinConf and SelectCoins be able to switch between
using BnB or Knapsack for choosing coins.
Has SelectCoinsMinConf do the preprocessing necessary to support either
BnB or Knapsack. This includes calculating the filtering the effective
values for each input.
Uses BnB in CreateTransaction to find an exact match for the output.
If BnB fails, it will fallback to the Knapsack solver.
Dash specific note: just always use Knapsack in CreateTransaction.
* Benchmark BnB in the worst case where it exhausts
* Add a test to make sure that negative effective values are filtered
* More of 12747: Fix typos
Co-authored-by: Andrew Chow <achow101-github@achow101.com>
2020-12-18 18:43:48 +01:00
|
|
|
wallet/test/wallet_crypto_tests.cpp \
|
2018-10-18 10:58:18 +02:00
|
|
|
wallet/test/coinselector_tests.cpp \
|
2022-04-04 00:26:52 +02:00
|
|
|
wallet/test/init_tests.cpp \
|
|
|
|
wallet/test/ismine_tests.cpp
|
2018-04-10 14:24:05 +02:00
|
|
|
|
|
|
|
BITCOIN_TEST_SUITE += \
|
|
|
|
wallet/test/wallet_test_fixture.cpp \
|
2018-10-18 10:58:18 +02:00
|
|
|
wallet/test/wallet_test_fixture.h \
|
|
|
|
wallet/test/init_test_fixture.cpp \
|
|
|
|
wallet/test/init_test_fixture.h
|
2014-05-28 19:38:41 +02:00
|
|
|
endif
|
|
|
|
|
2018-04-10 14:24:05 +02:00
|
|
|
test_test_dash_SOURCES = $(BITCOIN_TEST_SUITE) $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
2020-03-19 23:46:56 +01:00
|
|
|
test_test_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(TESTDEFS) $(EVENT_CFLAGS)
|
2019-11-21 21:13:08 +01:00
|
|
|
test_test_dash_LDADD = $(LIBTEST_UTIL)
|
2014-05-28 19:38:41 +02:00
|
|
|
if ENABLE_WALLET
|
2015-04-03 00:51:08 +02:00
|
|
|
test_test_dash_LDADD += $(LIBBITCOIN_WALLET)
|
2014-05-28 19:38:41 +02:00
|
|
|
endif
|
2018-06-11 14:41:08 +02:00
|
|
|
test_test_dash_LDADD += $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \
|
2019-08-03 19:04:15 +02:00
|
|
|
$(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BACKTRACE_LIB) $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS)
|
|
|
|
test_test_dash_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-06-06 16:57:28 +02:00
|
|
|
|
2019-10-26 14:15:43 +02:00
|
|
|
test_test_dash_LDADD += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(BLS_LIBS) $(GMP_LIBS)
|
2022-08-23 18:03:33 +02:00
|
|
|
test_test_dash_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -static
|
2014-05-28 19:38:41 +02:00
|
|
|
|
2014-11-18 18:06:32 +01:00
|
|
|
if ENABLE_ZMQ
|
2021-08-11 06:18:40 +02:00
|
|
|
test_test_dash_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
|
2014-11-18 18:06:32 +01:00
|
|
|
endif
|
2021-08-11 05:20:43 +02:00
|
|
|
|
|
|
|
if ENABLE_FUZZ
|
2022-08-23 18:03:33 +02:00
|
|
|
FUZZ_SUITE_LDFLAGS_COMMON = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(LDFLAGS_WRAP_EXCEPTIONS) $(PTHREAD_FLAGS)
|
|
|
|
|
2022-09-19 09:03:12 +02:00
|
|
|
test_fuzz_fuzz_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
test_fuzz_fuzz_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
|
|
|
test_fuzz_fuzz_LDADD = $(FUZZ_SUITE_LD_COMMON)
|
|
|
|
test_fuzz_fuzz_LDFLAGS = $(FUZZ_SUITE_LDFLAGS_COMMON)
|
|
|
|
test_fuzz_fuzz_SOURCES = \
|
|
|
|
test/fuzz/addition_overflow.cpp \
|
|
|
|
test/fuzz/addrdb.cpp \
|
|
|
|
test/fuzz/addrman.cpp \
|
|
|
|
test/fuzz/asmap.cpp \
|
|
|
|
test/fuzz/asmap_direct.cpp \
|
|
|
|
test/fuzz/autofile.cpp \
|
|
|
|
test/fuzz/banman.cpp \
|
|
|
|
test/fuzz/base_encode_decode.cpp \
|
|
|
|
test/fuzz/bech32.cpp \
|
|
|
|
test/fuzz/block.cpp \
|
|
|
|
test/fuzz/block_header.cpp \
|
|
|
|
test/fuzz/blockfilter.cpp \
|
|
|
|
test/fuzz/bloom_filter.cpp \
|
|
|
|
test/fuzz/buffered_file.cpp \
|
|
|
|
test/fuzz/chain.cpp \
|
|
|
|
test/fuzz/checkqueue.cpp \
|
|
|
|
test/fuzz/coins_view.cpp \
|
|
|
|
test/fuzz/connman.cpp \
|
|
|
|
test/fuzz/crypto.cpp \
|
|
|
|
test/fuzz/crypto_aes256.cpp \
|
|
|
|
test/fuzz/crypto_aes256cbc.cpp \
|
|
|
|
test/fuzz/crypto_chacha20.cpp \
|
|
|
|
test/fuzz/crypto_chacha20_poly1305_aead.cpp \
|
|
|
|
test/fuzz/crypto_common.cpp \
|
|
|
|
test/fuzz/crypto_hkdf_hmac_sha256_l32.cpp \
|
|
|
|
test/fuzz/crypto_poly1305.cpp \
|
|
|
|
test/fuzz/cuckoocache.cpp \
|
|
|
|
test/fuzz/decode_tx.cpp \
|
|
|
|
test/fuzz/descriptor_parse.cpp \
|
|
|
|
test/fuzz/deserialize.cpp \
|
|
|
|
test/fuzz/eval_script.cpp \
|
|
|
|
test/fuzz/fee_rate.cpp \
|
|
|
|
test/fuzz/fees.cpp \
|
|
|
|
test/fuzz/flatfile.cpp \
|
|
|
|
test/fuzz/float.cpp \
|
|
|
|
test/fuzz/golomb_rice.cpp \
|
|
|
|
test/fuzz/hex.cpp \
|
|
|
|
test/fuzz/http_request.cpp \
|
|
|
|
test/fuzz/integer.cpp \
|
|
|
|
test/fuzz/key.cpp \
|
|
|
|
test/fuzz/key_io.cpp \
|
|
|
|
test/fuzz/kitchen_sink.cpp \
|
|
|
|
test/fuzz/load_external_block_file.cpp \
|
|
|
|
test/fuzz/locale.cpp \
|
|
|
|
test/fuzz/merkleblock.cpp \
|
|
|
|
test/fuzz/message.cpp \
|
|
|
|
test/fuzz/multiplication_overflow.cpp \
|
|
|
|
test/fuzz/net.cpp \
|
|
|
|
test/fuzz/net_permissions.cpp \
|
|
|
|
test/fuzz/netaddress.cpp \
|
|
|
|
test/fuzz/p2p_transport_deserializer.cpp \
|
|
|
|
test/fuzz/parse_hd_keypath.cpp \
|
|
|
|
test/fuzz/parse_iso8601.cpp \
|
|
|
|
test/fuzz/parse_numbers.cpp \
|
|
|
|
test/fuzz/parse_script.cpp \
|
|
|
|
test/fuzz/parse_univalue.cpp \
|
|
|
|
test/fuzz/policy_estimator.cpp \
|
|
|
|
test/fuzz/pow.cpp \
|
|
|
|
test/fuzz/prevector.cpp \
|
|
|
|
test/fuzz/primitives_transaction.cpp \
|
|
|
|
test/fuzz/process_message.cpp \
|
|
|
|
test/fuzz/process_messages.cpp \
|
|
|
|
test/fuzz/protocol.cpp \
|
|
|
|
test/fuzz/psbt.cpp \
|
|
|
|
test/fuzz/random.cpp \
|
|
|
|
test/fuzz/rolling_bloom_filter.cpp \
|
|
|
|
test/fuzz/script.cpp \
|
|
|
|
test/fuzz/script_bitcoin_consensus.cpp \
|
|
|
|
test/fuzz/script_descriptor_cache.cpp \
|
|
|
|
test/fuzz/script_flags.cpp \
|
|
|
|
test/fuzz/script_interpreter.cpp \
|
|
|
|
test/fuzz/script_ops.cpp \
|
|
|
|
test/fuzz/script_sigcache.cpp \
|
|
|
|
test/fuzz/script_sign.cpp \
|
|
|
|
test/fuzz/scriptnum_ops.cpp \
|
|
|
|
test/fuzz/secp256k1_ec_seckey_import_export_der.cpp \
|
|
|
|
test/fuzz/secp256k1_ecdsa_signature_parse_der_lax.cpp \
|
|
|
|
test/fuzz/signature_checker.cpp \
|
|
|
|
test/fuzz/span.cpp \
|
|
|
|
test/fuzz/spanparsing.cpp \
|
|
|
|
test/fuzz/string.cpp \
|
|
|
|
test/fuzz/strprintf.cpp \
|
|
|
|
test/fuzz/system.cpp \
|
|
|
|
test/fuzz/timedata.cpp \
|
|
|
|
test/fuzz/transaction.cpp \
|
|
|
|
test/fuzz/tx_in.cpp \
|
|
|
|
test/fuzz/tx_out.cpp
|
2019-12-18 17:25:20 +01:00
|
|
|
|
2021-08-11 05:20:43 +02:00
|
|
|
endif # ENABLE_FUZZ
|
2014-11-18 18:06:32 +01:00
|
|
|
|
2015-04-03 00:51:08 +02:00
|
|
|
nodist_test_test_dash_SOURCES = $(GENERATED_TEST_FILES)
|
2014-05-28 19:38:41 +02:00
|
|
|
|
|
|
|
$(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
|
|
|
|
|
2020-08-15 03:32:11 +02:00
|
|
|
CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno test/fuzz/*.gcda test/fuzz/*.gcno test/util/*.gcda test/util/*.gcno $(GENERATED_TEST_FILES) $(BITCOIN_TESTS:=.log)
|
2014-05-28 19:38:41 +02:00
|
|
|
|
|
|
|
CLEANFILES += $(CLEAN_BITCOIN_TEST)
|
|
|
|
|
2018-11-05 15:30:23 +01:00
|
|
|
if TARGET_WINDOWS
|
2015-04-03 00:51:08 +02:00
|
|
|
dash_test: $(TEST_BINARY)
|
2018-11-05 15:30:23 +01:00
|
|
|
else
|
|
|
|
if ENABLE_BENCH
|
|
|
|
dash_test: $(TEST_BINARY) $(BENCH_BINARY)
|
|
|
|
else
|
|
|
|
dash_test: $(TEST_BINARY)
|
|
|
|
endif
|
|
|
|
endif
|
2014-05-28 19:38:41 +02:00
|
|
|
|
2015-04-03 00:51:08 +02:00
|
|
|
dash_test_check: $(TEST_BINARY) FORCE
|
2014-05-28 19:38:41 +02:00
|
|
|
$(MAKE) check-TESTS TESTS=$^
|
|
|
|
|
2015-04-03 00:51:08 +02:00
|
|
|
dash_test_clean : FORCE
|
|
|
|
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_dash_OBJECTS) $(TEST_BINARY)
|
2014-06-04 23:13:03 +02:00
|
|
|
|
2018-04-10 14:24:05 +02:00
|
|
|
check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
|
2018-09-27 17:12:28 +02:00
|
|
|
if BUILD_BITCOIN_TX
|
2019-05-19 22:20:34 +02:00
|
|
|
@echo "Running test/util/bitcoin-util-test.py..."
|
2017-10-03 21:24:53 +02:00
|
|
|
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
|
2018-09-27 17:12:28 +02:00
|
|
|
endif
|
2018-04-25 15:56:33 +02:00
|
|
|
@echo "Running test/util/rpcauth-test.py..."
|
|
|
|
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
|
2018-11-05 15:30:23 +01:00
|
|
|
if TARGET_WINDOWS
|
|
|
|
else
|
|
|
|
if ENABLE_BENCH
|
|
|
|
# Disabled because benchmarks are too heavy in Dash
|
|
|
|
# @echo "Running bench/bench_dash"
|
|
|
|
# $(BENCH_BINARY)
|
|
|
|
endif
|
|
|
|
endif
|
2014-11-06 02:56:45 +01:00
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
|
2022-05-02 17:31:46 +02:00
|
|
|
|
|
|
|
if !ENABLE_FUZZ
|
|
|
|
UNIVALUE_TESTS = univalue/test/object univalue/test/unitester univalue/test/no_nul
|
|
|
|
noinst_PROGRAMS += $(UNIVALUE_TESTS)
|
|
|
|
TESTS += $(UNIVALUE_TESTS)
|
|
|
|
|
|
|
|
univalue_test_unitester_SOURCES = $(UNIVALUE_TEST_UNITESTER_INT)
|
|
|
|
univalue_test_unitester_LDADD = $(LIBUNIVALUE)
|
|
|
|
univalue_test_unitester_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -DJSON_TEST_SRC=\"$(srcdir)/$(UNIVALUE_TEST_DATA_DIR_INT)\"
|
|
|
|
univalue_test_unitester_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
|
|
|
univalue_test_no_nul_SOURCES = $(UNIVALUE_TEST_NO_NUL_INT)
|
|
|
|
univalue_test_no_nul_LDADD = $(LIBUNIVALUE)
|
|
|
|
univalue_test_no_nul_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
|
|
|
|
univalue_test_no_nul_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
|
|
|
univalue_test_object_SOURCES = $(UNIVALUE_TEST_OBJECT_INT)
|
|
|
|
univalue_test_object_LDADD = $(LIBUNIVALUE)
|
|
|
|
univalue_test_object_CPPFLAGS = -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
|
|
|
|
univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
2017-07-04 05:20:19 +02:00
|
|
|
endif
|
2014-11-06 02:56:45 +01:00
|
|
|
|
2022-09-19 09:03:12 +02:00
|
|
|
if ENABLE_FUZZ_LINK_ALL
|
|
|
|
all-local: $(FUZZ_BINARY)
|
|
|
|
bash ./test/fuzz/danger_link_all.sh
|
|
|
|
endif
|
|
|
|
|
2018-04-10 14:24:05 +02:00
|
|
|
%.cpp.test: %.cpp
|
2018-06-01 10:07:26 +02:00
|
|
|
@echo Running tests: `cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
|
2020-03-31 21:39:08 +02:00
|
|
|
$(AM_V_at)$(TEST_BINARY) --catch_system_errors=no -l test_suite -t "`cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" -- DEBUG_LOG_OUT > $<.log 2>&1 || (cat $<.log && false)
|
2018-04-10 14:24:05 +02:00
|
|
|
|
2018-01-24 16:29:24 +01:00
|
|
|
test/data/%.json.h: test/data/%.json
|
2014-06-04 23:13:03 +02:00
|
|
|
@$(MKDIR_P) $(@D)
|
2016-11-15 10:34:46 +01:00
|
|
|
@{ \
|
|
|
|
echo "namespace json_tests{" && \
|
|
|
|
echo "static unsigned const char $(*F)[] = {" && \
|
|
|
|
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
|
|
|
|
echo "};};"; \
|
|
|
|
} > "$@.new" && mv -f "$@.new" "$@"
|
2014-06-04 23:13:03 +02:00
|
|
|
@echo "Generated $@"
|
2018-01-24 09:11:22 +01:00
|
|
|
|
2018-01-24 16:29:24 +01:00
|
|
|
test/data/%.raw.h: test/data/%.raw
|
2018-01-24 09:11:22 +01:00
|
|
|
@$(MKDIR_P) $(@D)
|
|
|
|
@{ \
|
2018-01-24 16:29:24 +01:00
|
|
|
echo "namespace raw_tests{" && \
|
2018-01-24 09:11:22 +01:00
|
|
|
echo "static unsigned const char $(*F)[] = {" && \
|
2018-01-24 16:29:24 +01:00
|
|
|
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
|
|
|
|
echo "};};"; \
|
2018-01-24 09:11:22 +01:00
|
|
|
} > "$@.new" && mv -f "$@.new" "$@"
|
|
|
|
@echo "Generated $@"
|