From 8a1ec935a0437afb08d31b444d5dd284d1fd3a2b Mon Sep 17 00:00:00 2001 From: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> Date: Thu, 19 Mar 2020 22:46:56 +0000 Subject: [PATCH] Backport 11651 (#3358) * scripted-diff: Replace #include "" with #include <> (ryanofsky) -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT- Signed-off-by: Pasta * scripted-diff: Replace #include "" with #include <> (Dash Specific) -BEGIN VERIFY SCRIPT- for f in \ src/bls/*.cpp \ src/bls/*.h \ src/evo/*.cpp \ src/evo/*.h \ src/governance/*.cpp \ src/governance/*.h \ src/llmq/*.cpp \ src/llmq/*.h \ src/masternode/*.cpp \ src/masternode/*.h \ src/privatesend/*.cpp \ src/privatesend/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT- Signed-off-by: Pasta * build: Remove -I for everything but project root Remove -I from build system for everything but the project root, and built-in dependencies. Signed-off-by: Pasta # Conflicts: # src/Makefile.test.include * qt: refactor: Use absolute include paths in .ui files * qt: refactor: Changes to make include paths absolute This makes all include paths in the GUI absolute. Many changes are involved as every single source file in src/qt/ assumes to be able to use relative includes. Signed-off-by: Pasta # Conflicts: # src/qt/dash.cpp # src/qt/optionsmodel.cpp # src/qt/test/rpcnestedtests.cpp * test: refactor: Use absolute include paths for test data files * Recommend #include<> syntax in developer notes * refactor: Include obj/build.h instead of build.h * END BACKPORT #11651 Remove trailing whitespace causing travis failure * fix backport 11651 Signed-off-by: Pasta * More of 11651 * fix blockchain.cpp Signed-off-by: pasta * Add missing "qt/" in includes * Add missing "test/" in includes * Fix trailing whitespaces Co-authored-by: Wladimir J. van der Laan Co-authored-by: Russell Yanofsky Co-authored-by: MeshCollider Co-authored-by: UdjinM6 --- doc/developer-notes.md | 8 ++ src/Makefile.am | 2 +- src/Makefile.qt.include | 3 +- src/Makefile.test.include | 2 +- src/addrdb.cpp | 20 ++-- src/addrdb.h | 4 +- src/addressindex.h | 4 +- src/addrman.cpp | 8 +- src/addrman.h | 12 +-- src/arith_uint256.cpp | 8 +- src/base58.cpp | 6 +- src/base58.h | 12 +-- src/batchedlogger.cpp | 4 +- src/batchedlogger.h | 2 +- src/bench/Examples.cpp | 6 +- src/bench/base58.cpp | 6 +- src/bench/bench.cpp | 4 +- src/bench/bench_dash.cpp | 16 +-- src/bench/bls.cpp | 8 +- src/bench/bls_dkg.cpp | 6 +- src/bench/ccoins_caching.cpp | 8 +- src/bench/checkblock.cpp | 12 +-- src/bench/checkqueue.cpp | 12 +-- src/bench/coin_selection.cpp | 4 +- src/bench/crypto_hash.cpp | 20 ++-- src/bench/ecdsa.cpp | 4 +- src/bench/lockedpool.cpp | 4 +- src/bench/mempool_eviction.cpp | 6 +- src/bench/merkle_root.cpp | 8 +- src/bench/perf.cpp | 2 +- src/bench/prevector.cpp | 6 +- src/bench/rollingbloom.cpp | 4 +- src/bench/string_cast.cpp | 6 +- src/bip39.cpp | 8 +- src/bip39.h | 2 +- src/blockencodings.cpp | 20 ++-- src/blockencodings.h | 2 +- src/bloom.cpp | 22 ++-- src/bloom.h | 2 +- src/bls/bls.cpp | 10 +- src/bls/bls.h | 8 +- src/bls/bls_batchverifier.h | 2 +- src/bls/bls_ies.cpp | 10 +- src/bls/bls_ies.h | 4 +- src/bls/bls_worker.cpp | 8 +- src/bls/bls_worker.h | 4 +- src/cachemap.h | 2 +- src/cachemultimap.h | 4 +- src/chain.cpp | 2 +- src/chain.h | 10 +- src/chainparams.cpp | 14 +-- src/chainparams.h | 8 +- src/chainparamsbase.cpp | 6 +- src/checkpoints.cpp | 12 +-- src/checkpoints.h | 2 +- src/checkqueue.h | 2 +- src/clientversion.cpp | 6 +- src/clientversion.h | 2 +- src/coins.cpp | 8 +- src/coins.h | 14 +-- src/compat.h | 4 +- src/compat/byteswap.h | 2 +- src/compat/endian.h | 4 +- src/compat/glibc_compat.cpp | 2 +- src/compat/glibc_sanity.cpp | 2 +- src/compat/strnlen.cpp | 2 +- src/compressor.cpp | 8 +- src/compressor.h | 6 +- src/consensus/merkle.cpp | 6 +- src/consensus/merkle.h | 6 +- src/consensus/params.h | 2 +- src/consensus/tx_verify.cpp | 16 +-- src/consensus/tx_verify.h | 2 +- src/core_io.h | 2 +- src/core_memusage.h | 6 +- src/core_read.cpp | 18 ++-- src/core_write.cpp | 32 +++--- src/crypto/aes.cpp | 6 +- src/crypto/aes.h | 2 +- src/crypto/chacha20.cpp | 4 +- src/crypto/common.h | 4 +- src/crypto/hmac_sha256.cpp | 2 +- src/crypto/hmac_sha256.h | 2 +- src/crypto/hmac_sha512.cpp | 2 +- src/crypto/hmac_sha512.h | 2 +- src/crypto/ripemd160.cpp | 4 +- src/crypto/sha1.cpp | 4 +- src/crypto/sha256.cpp | 4 +- src/crypto/sha256_avx2.cpp | 4 +- src/crypto/sha256_sse41.cpp | 4 +- src/crypto/sha512.cpp | 4 +- src/crypto/sph_blake.h | 2 +- src/crypto/sph_bmw.h | 2 +- src/crypto/sph_cubehash.h | 2 +- src/crypto/sph_echo.h | 2 +- src/crypto/sph_groestl.h | 2 +- src/crypto/sph_jh.h | 2 +- src/crypto/sph_keccak.h | 2 +- src/crypto/sph_luffa.h | 2 +- src/crypto/sph_shavite.h | 2 +- src/crypto/sph_simd.h | 2 +- src/crypto/sph_skein.h | 2 +- src/dash-cli.cpp | 20 ++-- src/dash-tx.cpp | 30 +++--- src/dashd.cpp | 28 +++--- src/dbwrapper.cpp | 8 +- src/dbwrapper.h | 14 +-- src/dsnotificationinterface.cpp | 28 +++--- src/dsnotificationinterface.h | 2 +- src/evo/cbtx.cpp | 22 ++-- src/evo/cbtx.h | 6 +- src/evo/deterministicmns.cpp | 22 ++-- src/evo/deterministicmns.h | 18 ++-- src/evo/evodb.cpp | 2 +- src/evo/evodb.h | 6 +- src/evo/mnauth.cpp | 16 +-- src/evo/mnauth.h | 4 +- src/evo/providertx.cpp | 26 ++--- src/evo/providertx.h | 14 +-- src/evo/simplifiedmns.cpp | 26 ++--- src/evo/simplifiedmns.h | 12 +-- src/evo/specialtx.cpp | 24 ++--- src/evo/specialtx.h | 6 +- src/flat-database.h | 12 +-- src/fs.cpp | 2 +- src/governance/governance-classes.cpp | 10 +- src/governance/governance-classes.h | 10 +- src/governance/governance-object.cpp | 24 ++--- src/governance/governance-object.h | 20 ++-- src/governance/governance-validators.cpp | 10 +- src/governance/governance-vote.cpp | 14 +-- src/governance/governance-vote.h | 6 +- src/governance/governance-votedb.cpp | 2 +- src/governance/governance-votedb.h | 8 +- src/governance/governance.cpp | 34 +++---- src/governance/governance.h | 24 ++--- src/hash.cpp | 8 +- src/hash.h | 34 +++---- src/hdchain.cpp | 14 +-- src/hdchain.h | 4 +- src/httprpc.cpp | 24 ++--- src/httpserver.cpp | 22 ++-- src/init.cpp | 116 +++++++++++----------- src/keepass.cpp | 22 ++-- src/keepass.h | 2 +- src/key.cpp | 12 +-- src/key.h | 8 +- src/keystore.cpp | 8 +- src/keystore.h | 12 +-- src/llmq/quorums.cpp | 30 +++--- src/llmq/quorums.h | 18 ++-- src/llmq/quorums_blockprocessor.cpp | 24 ++--- src/llmq/quorums_blockprocessor.h | 12 +-- src/llmq/quorums_chainlocks.cpp | 24 ++--- src/llmq/quorums_chainlocks.h | 8 +- src/llmq/quorums_commitment.cpp | 10 +- src/llmq/quorums_commitment.h | 8 +- src/llmq/quorums_debug.cpp | 10 +- src/llmq/quorums_debug.h | 6 +- src/llmq/quorums_dkgsession.cpp | 30 +++--- src/llmq/quorums_dkgsession.h | 14 +-- src/llmq/quorums_dkgsessionhandler.cpp | 20 ++-- src/llmq/quorums_dkgsessionhandler.h | 6 +- src/llmq/quorums_dkgsessionmgr.cpp | 18 ++-- src/llmq/quorums_dkgsessionmgr.h | 6 +- src/llmq/quorums_init.cpp | 24 ++--- src/llmq/quorums_instantsend.cpp | 24 ++--- src/llmq/quorums_instantsend.h | 8 +- src/llmq/quorums_signing.cpp | 22 ++-- src/llmq/quorums_signing.h | 12 +-- src/llmq/quorums_signing_shares.cpp | 20 ++-- src/llmq/quorums_signing_shares.h | 20 ++-- src/llmq/quorums_utils.cpp | 10 +- src/llmq/quorums_utils.h | 6 +- src/masternode/activemasternode.cpp | 16 +-- src/masternode/activemasternode.h | 14 +-- src/masternode/masternode-meta.cpp | 2 +- src/masternode/masternode-meta.h | 4 +- src/masternode/masternode-payments.cpp | 26 ++--- src/masternode/masternode-payments.h | 12 +-- src/masternode/masternode-sync.cpp | 20 ++-- src/masternode/masternode-sync.h | 4 +- src/masternode/masternode-utils.cpp | 10 +- src/masternode/masternode-utils.h | 2 +- src/memusage.h | 2 +- src/merkleblock.cpp | 8 +- src/merkleblock.h | 8 +- src/messagesigner.cpp | 12 +-- src/messagesigner.h | 2 +- src/miner.cpp | 60 +++++------ src/miner.h | 4 +- src/net.cpp | 38 +++---- src/net.h | 36 +++---- src/net_processing.cpp | 92 ++++++++--------- src/net_processing.h | 6 +- src/netaddress.cpp | 12 +-- src/netaddress.h | 6 +- src/netbase.cpp | 16 +-- src/netbase.h | 8 +- src/netfulfilledman.cpp | 8 +- src/netfulfilledman.h | 6 +- src/netmessagemaker.h | 4 +- src/noui.cpp | 6 +- src/policy/feerate.cpp | 4 +- src/policy/feerate.h | 4 +- src/policy/fees.cpp | 16 +-- src/policy/fees.h | 10 +- src/policy/policy.cpp | 12 +-- src/policy/policy.h | 8 +- src/pow.cpp | 12 +-- src/pow.h | 2 +- src/primitives/block.cpp | 12 +-- src/primitives/block.h | 6 +- src/primitives/transaction.cpp | 8 +- src/primitives/transaction.h | 8 +- src/privatesend/privatesend-client.cpp | 28 +++--- src/privatesend/privatesend-client.h | 8 +- src/privatesend/privatesend-server.cpp | 30 +++--- src/privatesend/privatesend-server.h | 4 +- src/privatesend/privatesend-util.cpp | 2 +- src/privatesend/privatesend-util.h | 2 +- src/privatesend/privatesend.cpp | 28 +++--- src/privatesend/privatesend.h | 16 +-- src/protocol.cpp | 6 +- src/protocol.h | 8 +- src/pubkey.cpp | 2 +- src/pubkey.h | 6 +- src/qt/addressbookpage.cpp | 22 ++-- src/qt/addresstablemodel.cpp | 10 +- src/qt/addresstablemodel.h | 2 +- src/qt/askpassphrasedialog.cpp | 12 +-- src/qt/bantablemodel.cpp | 12 +-- src/qt/bantablemodel.h | 2 +- src/qt/bitcoinaddressvalidator.cpp | 4 +- src/qt/bitcoinamountfield.cpp | 10 +- src/qt/bitcoinamountfield.h | 2 +- src/qt/bitcoingui.cpp | 50 +++++----- src/qt/bitcoingui.h | 4 +- src/qt/bitcoinunits.cpp | 6 +- src/qt/bitcoinunits.h | 2 +- src/qt/clientmodel.cpp | 36 +++---- src/qt/clientmodel.h | 4 +- src/qt/coincontroldialog.cpp | 34 +++---- src/qt/coincontroldialog.h | 2 +- src/qt/coincontroltreewidget.cpp | 4 +- src/qt/csvmodelwriter.cpp | 2 +- src/qt/dash.cpp | 52 +++++----- src/qt/editaddressdialog.cpp | 8 +- src/qt/forms/coincontroldialog.ui | 2 +- src/qt/forms/debugwindow.ui | 2 +- src/qt/forms/editaddressdialog.ui | 2 +- src/qt/forms/modaloverlay.ui | 2 +- src/qt/forms/openuridialog.ui | 2 +- src/qt/forms/optionsdialog.ui | 4 +- src/qt/forms/qrdialog.ui | 2 +- src/qt/forms/receivecoinsdialog.ui | 2 +- src/qt/forms/receiverequestdialog.ui | 2 +- src/qt/forms/sendcoinsdialog.ui | 4 +- src/qt/forms/sendcoinsentry.ui | 4 +- src/qt/forms/signverifymessagedialog.ui | 2 +- src/qt/guiutil.cpp | 32 +++--- src/qt/guiutil.h | 4 +- src/qt/intro.cpp | 14 +-- src/qt/masternodelist.cpp | 28 +++--- src/qt/masternodelist.h | 10 +- src/qt/modaloverlay.cpp | 8 +- src/qt/networkstyle.cpp | 10 +- src/qt/notificator.cpp | 4 +- src/qt/notificator.h | 2 +- src/qt/openuridialog.cpp | 8 +- src/qt/optionsdialog.cpp | 20 ++-- src/qt/optionsmodel.cpp | 30 +++--- src/qt/optionsmodel.h | 2 +- src/qt/overviewpage.cpp | 30 +++--- src/qt/overviewpage.h | 2 +- src/qt/paymentrequestplus.cpp | 4 +- src/qt/paymentrequestplus.h | 4 +- src/qt/paymentserver.cpp | 20 ++-- src/qt/paymentserver.h | 4 +- src/qt/peertablemodel.cpp | 12 +-- src/qt/peertablemodel.h | 4 +- src/qt/platformstyle.cpp | 4 +- src/qt/qrdialog.cpp | 16 +-- src/qt/qrdialog.h | 2 +- src/qt/qvalidatedlineedit.cpp | 6 +- src/qt/qvaluecombobox.cpp | 2 +- src/qt/receivecoinsdialog.cpp | 22 ++-- src/qt/receivecoinsdialog.h | 2 +- src/qt/receiverequestdialog.cpp | 16 +-- src/qt/receiverequestdialog.h | 2 +- src/qt/recentrequeststablemodel.cpp | 12 +-- src/qt/recentrequeststablemodel.h | 2 +- src/qt/rpcconsole.cpp | 26 ++--- src/qt/rpcconsole.h | 8 +- src/qt/sendcoinsdialog.cpp | 40 ++++---- src/qt/sendcoinsdialog.h | 2 +- src/qt/sendcoinsentry.cpp | 16 +-- src/qt/sendcoinsentry.h | 2 +- src/qt/signverifymessagedialog.cpp | 20 ++-- src/qt/splashscreen.cpp | 20 ++-- src/qt/test/compattests.cpp | 6 +- src/qt/test/paymentservertests.cpp | 18 ++-- src/qt/test/paymentservertests.h | 2 +- src/qt/test/rpcnestedtests.cpp | 26 ++--- src/qt/test/rpcnestedtests.h | 4 +- src/qt/test/test_main.cpp | 18 ++-- src/qt/test/trafficgraphdatatests.cpp | 4 +- src/qt/test/uritests.cpp | 6 +- src/qt/test/wallettests.cpp | 36 +++---- src/qt/trafficgraphdata.cpp | 2 +- src/qt/trafficgraphwidget.cpp | 4 +- src/qt/trafficgraphwidget.h | 2 +- src/qt/transactiondesc.cpp | 26 ++--- src/qt/transactiondescdialog.cpp | 8 +- src/qt/transactionfilterproxy.cpp | 6 +- src/qt/transactionfilterproxy.h | 2 +- src/qt/transactionrecord.cpp | 14 +-- src/qt/transactionrecord.h | 6 +- src/qt/transactiontablemodel.cpp | 28 +++--- src/qt/transactiontablemodel.h | 2 +- src/qt/transactionview.cpp | 30 +++--- src/qt/transactionview.h | 2 +- src/qt/utilitydialog.cpp | 26 ++--- src/qt/walletframe.cpp | 6 +- src/qt/walletmodel.cpp | 44 ++++---- src/qt/walletmodel.h | 8 +- src/qt/walletmodeltransaction.cpp | 4 +- src/qt/walletmodeltransaction.h | 2 +- src/qt/walletview.cpp | 34 +++---- src/qt/walletview.h | 4 +- src/qt/winshutdownmonitor.cpp | 6 +- src/random.cpp | 12 +-- src/random.h | 6 +- src/rest.cpp | 28 +++--- src/rpc/blockchain.cpp | 54 +++++----- src/rpc/client.cpp | 6 +- src/rpc/governance.cpp | 32 +++--- src/rpc/masternode.cpp | 34 +++---- src/rpc/mining.cpp | 58 +++++------ src/rpc/mining.h | 2 +- src/rpc/misc.cpp | 42 ++++---- src/rpc/net.cpp | 34 +++---- src/rpc/privatesend.cpp | 10 +- src/rpc/protocol.cpp | 14 +-- src/rpc/protocol.h | 2 +- src/rpc/rawtransaction.cpp | 60 +++++------ src/rpc/rpcevo.cpp | 36 +++---- src/rpc/rpcquorums.cpp | 18 ++-- src/rpc/safemode.cpp | 8 +- src/rpc/server.cpp | 18 ++-- src/rpc/server.h | 6 +- src/saltedhasher.cpp | 4 +- src/saltedhasher.h | 4 +- src/scheduler.cpp | 6 +- src/scheduler.h | 2 +- src/script/dashconsensus.cpp | 10 +- src/script/dashconsensus.h | 2 +- src/script/interpreter.cpp | 16 +-- src/script/interpreter.h | 4 +- src/script/ismine.cpp | 12 +-- src/script/ismine.h | 2 +- src/script/script.cpp | 6 +- src/script/script.h | 6 +- src/script/script_error.cpp | 2 +- src/script/sigcache.cpp | 14 +-- src/script/sigcache.h | 2 +- src/script/sign.cpp | 14 +-- src/script/sign.h | 2 +- src/script/standard.cpp | 10 +- src/script/standard.h | 4 +- src/serialize.h | 4 +- src/spentindex.h | 8 +- src/spork.cpp | 14 +-- src/spork.h | 8 +- src/stacktraces.cpp | 16 +-- src/stacktraces.h | 2 +- src/streams.h | 4 +- src/support/allocators/mt_pooled_secure.h | 2 +- src/support/allocators/pooled_secure.h | 4 +- src/support/allocators/secure.h | 4 +- src/support/allocators/zeroafterfree.h | 2 +- src/support/cleanse.cpp | 2 +- src/support/lockedpool.cpp | 6 +- src/sync.cpp | 6 +- src/sync.h | 2 +- src/test/DoS_tests.cpp | 20 ++-- src/test/addrman_tests.cpp | 10 +- src/test/allocator_tests.cpp | 6 +- src/test/amount_tests.cpp | 6 +- src/test/arith_uint256_tests.cpp | 8 +- src/test/base32_tests.cpp | 4 +- src/test/base58_tests.cpp | 20 ++-- src/test/base64_tests.cpp | 4 +- src/test/bip32_tests.cpp | 12 +-- src/test/bip39_tests.cpp | 14 +-- src/test/blockchain_tests.cpp | 6 +- src/test/blockencodings_tests.cpp | 10 +- src/test/bloom_tests.cpp | 24 ++--- src/test/bls_tests.cpp | 6 +- src/test/bswap_tests.cpp | 4 +- src/test/cachemap_tests.cpp | 4 +- src/test/cachemultimap_tests.cpp | 4 +- src/test/checkqueue_tests.cpp | 12 +-- src/test/coins_tests.cpp | 16 +-- src/test/compress_tests.cpp | 6 +- src/test/crypto_tests.cpp | 26 ++--- src/test/cuckoocache_tests.cpp | 8 +- src/test/dbwrapper_tests.cpp | 8 +- src/test/evo_deterministicmns_tests.cpp | 28 +++--- src/test/evo_simplifiedmns_tests.cpp | 8 +- src/test/getarg_tests.cpp | 4 +- src/test/governance_validators_tests.cpp | 10 +- src/test/hash_tests.cpp | 6 +- src/test/key_tests.cpp | 14 +-- src/test/limitedmap_tests.cpp | 4 +- src/test/main_tests.cpp | 4 +- src/test/mempool_tests.cpp | 6 +- src/test/merkle_tests.cpp | 4 +- src/test/miner_tests.cpp | 34 +++---- src/test/multisig_tests.cpp | 20 ++-- src/test/net_tests.cpp | 18 ++-- src/test/netbase_tests.cpp | 6 +- src/test/pmt_tests.cpp | 16 +-- src/test/policyestimator_tests.cpp | 10 +- src/test/pow_tests.cpp | 12 +-- src/test/prevector_tests.cpp | 10 +- src/test/privatesend_tests.cpp | 6 +- src/test/raii_event_tests.cpp | 4 +- src/test/random_tests.cpp | 4 +- src/test/ratecheck_tests.cpp | 4 +- src/test/reverselock_tests.cpp | 4 +- src/test/rpc_tests.cpp | 12 +-- src/test/sanity_tests.cpp | 6 +- src/test/scheduler_tests.cpp | 6 +- src/test/script_P2PKH_tests.cpp | 4 +- src/test/script_P2PK_tests.cpp | 4 +- src/test/script_P2SH_tests.cpp | 22 ++-- src/test/script_standard_tests.cpp | 14 +-- src/test/script_tests.cpp | 22 ++-- src/test/scriptnum10.h | 2 +- src/test/scriptnum_tests.cpp | 6 +- src/test/serialize_tests.cpp | 8 +- src/test/sighash_tests.cpp | 24 ++--- src/test/sigopcount_tests.cpp | 14 +-- src/test/skiplist_tests.cpp | 6 +- src/test/streams_tests.cpp | 6 +- src/test/subsidy_tests.cpp | 6 +- src/test/test_dash.cpp | 46 ++++----- src/test/test_dash.h | 16 +-- src/test/test_dash_fuzzy.cpp | 30 +++--- src/test/test_dash_main.cpp | 4 +- src/test/timedata_tests.cpp | 4 +- src/test/torcontrol_tests.cpp | 4 +- src/test/transaction_tests.cpp | 30 +++--- src/test/txvalidationcache_tests.cpp | 28 +++--- src/test/uint256_tests.cpp | 8 +- src/test/util_tests.cpp | 14 +-- src/test/versionbits_tests.cpp | 12 +-- src/threadinterrupt.cpp | 2 +- src/timedata.cpp | 16 +-- src/torcontrol.cpp | 12 +-- src/torcontrol.h | 2 +- src/txdb.cpp | 18 ++-- src/txdb.h | 8 +- src/txmempool.cpp | 36 +++---- src/txmempool.h | 24 ++--- src/ui_interface.cpp | 4 +- src/uint256.cpp | 4 +- src/uint256.h | 2 +- src/undo.h | 8 +- src/util.cpp | 22 ++-- src/util.h | 14 +-- src/utilmoneystr.cpp | 8 +- src/utilmoneystr.h | 2 +- src/utilstrencodings.cpp | 4 +- src/utiltime.cpp | 6 +- src/validation.cpp | 88 ++++++++-------- src/validation.h | 20 ++-- src/validationinterface.cpp | 14 +-- src/validationinterface.h | 2 +- src/versionbits.cpp | 4 +- src/versionbits.h | 2 +- src/wallet/coincontrol.h | 6 +- src/wallet/crypter.cpp | 12 +-- src/wallet/crypter.h | 6 +- src/wallet/db.cpp | 14 +-- src/wallet/db.h | 12 +-- src/wallet/fees.cpp | 14 +-- src/wallet/fees.h | 2 +- src/wallet/init.cpp | 16 +-- src/wallet/rpcdump.cpp | 30 +++--- src/wallet/rpcwallet.cpp | 46 ++++----- src/wallet/test/accounting_tests.cpp | 4 +- src/wallet/test/crypto_tests.cpp | 6 +- src/wallet/test/wallet_test_fixture.cpp | 8 +- src/wallet/test/wallet_test_fixture.h | 2 +- src/wallet/test/wallet_tests.cpp | 14 +-- src/wallet/wallet.cpp | 66 ++++++------ src/wallet/wallet.h | 32 +++--- src/wallet/walletdb.cpp | 24 ++--- src/wallet/walletdb.h | 8 +- src/warnings.cpp | 10 +- src/zmq/zmqabstractnotifier.cpp | 4 +- src/zmq/zmqabstractnotifier.h | 2 +- src/zmq/zmqconfig.h | 14 +-- src/zmq/zmqnotificationinterface.cpp | 12 +-- src/zmq/zmqnotificationinterface.h | 2 +- src/zmq/zmqpublishnotifier.cpp | 12 +-- src/zmq/zmqpublishnotifier.h | 2 +- 509 files changed, 2944 insertions(+), 2937 deletions(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index be32de6ab4..58656dc710 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -503,6 +503,14 @@ namespace { - *Rationale*: Avoids confusion about the namespace context +- Prefer `#include ` bracket syntax instead of + `#include "primitives/transactions.h"`` quote syntax when possible. + + - *Rationale*: Bracket syntax is less ambiguous because the preprocessor + searches a fixed list of include directories without taking location of the + source file into account. This allows quoted includes to stand out more when + the location of the source file actually is relevant. + GUI ----- diff --git a/src/Makefile.am b/src/Makefile.am index ba48c88e8c..a9ead290a5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,7 +37,7 @@ else LIBUNIVALUE = $(UNIVALUE_LIBS) endif -BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS) +BITCOIN_INCLUDES=-I$(builddir) $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS) BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 17d52d7ed7..db25b873a7 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -325,8 +325,7 @@ RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png) BITCOIN_RC = qt/res/dash-qt-res.rc -BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \ - -I$(builddir)/qt/forms -DQT_NO_KEYWORDS +BITCOIN_QT_INCLUDES = -DQT_NO_KEYWORDS qt_libdashqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS) diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 5809cf58fe..743b5db88b 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -110,7 +110,7 @@ BITCOIN_TESTS += \ endif test_test_dash_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES) -test_test_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS) +test_test_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(TESTDEFS) $(EVENT_CFLAGS) test_test_dash_LDADD = if ENABLE_WALLET test_test_dash_LDADD += $(LIBBITCOIN_WALLET) diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 5239e89384..5a66ccc2e6 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -3,17 +3,17 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "addrdb.h" +#include -#include "addrman.h" -#include "chainparams.h" -#include "clientversion.h" -#include "fs.h" -#include "hash.h" -#include "random.h" -#include "streams.h" -#include "tinyformat.h" -#include "util.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { diff --git a/src/addrdb.h b/src/addrdb.h index 3fb60fc036..c42494f88f 100644 --- a/src/addrdb.h +++ b/src/addrdb.h @@ -6,8 +6,8 @@ #ifndef BITCOIN_ADDRDB_H #define BITCOIN_ADDRDB_H -#include "fs.h" -#include "serialize.h" +#include +#include #include #include diff --git a/src/addressindex.h b/src/addressindex.h index 9e734b84dc..807bce32c6 100644 --- a/src/addressindex.h +++ b/src/addressindex.h @@ -6,8 +6,8 @@ #ifndef BITCOIN_ADDRESSINDEX_H #define BITCOIN_ADDRESSINDEX_H -#include "uint256.h" -#include "amount.h" +#include +#include struct CMempoolAddressDelta { diff --git a/src/addrman.cpp b/src/addrman.cpp index ef26f90d73..35ed603952 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -3,11 +3,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "addrman.h" +#include -#include "hash.h" -#include "serialize.h" -#include "streams.h" +#include +#include +#include int CAddrInfo::GetTriedBucket(const uint256& nKey) const { diff --git a/src/addrman.h b/src/addrman.h index f1252289c2..df6c4129a5 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -6,12 +6,12 @@ #ifndef BITCOIN_ADDRMAN_H #define BITCOIN_ADDRMAN_H -#include "netaddress.h" -#include "protocol.h" -#include "random.h" -#include "sync.h" -#include "timedata.h" -#include "util.h" +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index 1755b72a83..7d1e601d45 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -3,11 +3,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "arith_uint256.h" +#include -#include "uint256.h" -#include "utilstrencodings.h" -#include "crypto/common.h" +#include +#include +#include #include #include diff --git a/src/base58.cpp b/src/base58.cpp index 5db8e807a3..58c70986bf 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -2,10 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "base58.h" +#include -#include "hash.h" -#include "uint256.h" +#include +#include #include #include diff --git a/src/base58.h b/src/base58.h index 4b895ca022..c378d1751a 100644 --- a/src/base58.h +++ b/src/base58.h @@ -14,12 +14,12 @@ #ifndef BITCOIN_BASE58_H #define BITCOIN_BASE58_H -#include "chainparams.h" -#include "key.h" -#include "pubkey.h" -#include "script/script.h" -#include "script/standard.h" -#include "support/allocators/zeroafterfree.h" +#include +#include +#include +#include