From ef4dfa8524f86962f499020182cb9c4ab54fc427 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Sun, 27 Jun 2021 12:03:13 +0530 Subject: [PATCH] merge bitcoin#14555: Move util files to directory (script modified to account for Dash backports, doesn't account for rebasing) ------------- BEGIN SCRIPT --------------- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp git mv src/utilasmap.h src/util/asmap.h git mv src/utilasmap.cpp src/util/asmap.cpp git mv src/utilstring.h src/util/string.h git mv src/utilstring.cpp src/util/string.cpp gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') gsed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h gsed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h gsed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h gsed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h gsed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h gsed -i 's/BITCOIN_UTILASMAP_H/BITCOIN_UTIL_ASMAP_H/g' src/util/asmap.h gsed -i 's/BITCOIN_UTILSTRING_H/BITCOIN_UTIL_STRING_H/g' src/util/string.h gsed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am gsed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am gsed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am gsed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am gsed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am gsed -i 's/utilasmap\.\(h\|cpp\)/util\/asmap\.\1/g' src/Makefile.am gsed -i 's/utilstring\.\(h\|cpp\)/util\/string\.\1/g' src/Makefile.am gsed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh gsed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh gsed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh gsed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh ------------- END SCRIPT --------------- --- src/Makefile.am | 32 +++++++++---------- src/addrdb.cpp | 2 +- src/addrman.h | 2 +- src/arith_uint256.cpp | 2 +- src/base58.cpp | 4 +-- src/batchedlogger.cpp | 2 +- src/bench/bench_dash.cpp | 2 +- src/bench/bls.cpp | 2 +- src/bench/checkqueue.cpp | 2 +- src/bench/crypto_hash.cpp | 2 +- src/bench/examples.cpp | 2 +- src/bench/string_cast.cpp | 2 +- src/bench/util_time.cpp | 2 +- src/blockencodings.cpp | 2 +- src/bls/bls.h | 2 +- src/bls/bls_worker.cpp | 2 +- src/chainparams.cpp | 4 +-- src/chainparamsbase.cpp | 4 +-- src/checkqueue.h | 2 +- src/coinjoin/coinjoin-client-options.cpp | 2 +- src/coinjoin/coinjoin-client.cpp | 4 +-- src/coinjoin/coinjoin-server.cpp | 4 +-- src/coinjoin/coinjoin.cpp | 4 +-- src/consensus/merkle.cpp | 2 +- src/consensus/tx_verify.cpp | 2 +- src/core_read.cpp | 4 +-- src/core_write.cpp | 6 ++-- src/dash-cli.cpp | 4 +-- src/dash-tx.cpp | 6 ++-- src/dashd.cpp | 6 ++-- src/dbwrapper.h | 4 +-- src/flat-database.h | 2 +- src/governance/governance-classes.cpp | 2 +- src/governance/governance-validators.cpp | 2 +- src/governance/governance-vote.cpp | 2 +- src/hdchain.cpp | 4 +-- src/httprpc.cpp | 4 +-- src/httpserver.cpp | 6 ++-- src/index/txindex.cpp | 2 +- src/init.cpp | 8 ++--- src/init.h | 2 +- src/interfaces/handler.cpp | 2 +- src/interfaces/node.cpp | 2 +- src/keepass.cpp | 4 +-- src/key_io.cpp | 2 +- src/keystore.cpp | 2 +- src/logging.cpp | 6 ++-- src/logging/timer.h | 2 +- src/merkleblock.cpp | 2 +- src/messagesigner.cpp | 2 +- src/miner.cpp | 4 +-- src/net.cpp | 2 +- src/net.h | 2 +- src/net_processing.cpp | 6 ++-- src/netaddress.cpp | 6 ++-- src/netaddress.h | 4 +-- src/netbase.cpp | 4 +-- src/netfulfilledman.cpp | 2 +- src/node/coinstats.cpp | 2 +- src/noui.cpp | 2 +- src/policy/fees.cpp | 2 +- src/policy/policy.cpp | 4 +-- src/primitives/block.cpp | 2 +- src/primitives/transaction.cpp | 2 +- src/protocol.cpp | 4 +-- src/qt/appearancewidget.cpp | 2 +- src/qt/bantablemodel.cpp | 2 +- src/qt/bitcoingui.cpp | 2 +- src/qt/clientmodel.cpp | 2 +- src/qt/dash.cpp | 2 +- src/qt/guiutil.cpp | 2 +- src/qt/intro.cpp | 2 +- src/qt/masternodelist.h | 2 +- src/qt/networkstyle.cpp | 2 +- src/qt/paymentrequestplus.cpp | 2 +- src/qt/paymentserver.cpp | 2 +- src/qt/rpcconsole.cpp | 2 +- src/qt/signverifymessagedialog.cpp | 2 +- src/qt/splashscreen.cpp | 2 +- src/qt/test/paymentservertests.cpp | 4 +-- src/qt/test/rpcnestedtests.cpp | 2 +- src/qt/test/test_main.cpp | 2 +- src/qt/transactiondesc.cpp | 2 +- src/qt/transactiontablemodel.cpp | 2 +- src/qt/utilitydialog.cpp | 2 +- src/qt/walletmodel.cpp | 2 +- src/qt/winshutdownmonitor.cpp | 2 +- src/random.cpp | 4 +-- src/rest.cpp | 2 +- src/rpc/blockchain.cpp | 4 +-- src/rpc/client.cpp | 2 +- src/rpc/coinjoin.cpp | 2 +- src/rpc/governance.cpp | 2 +- src/rpc/mining.cpp | 4 +-- src/rpc/misc.cpp | 4 +-- src/rpc/net.cpp | 4 +-- src/rpc/protocol.cpp | 6 ++-- src/rpc/rawtransaction.cpp | 2 +- src/rpc/rpcevo.cpp | 2 +- src/rpc/server.cpp | 4 +-- src/rpc/util.cpp | 2 +- src/rpc/util.h | 2 +- src/script/script.cpp | 2 +- src/script/sigcache.cpp | 2 +- src/script/standard.cpp | 4 +-- src/spork.h | 2 +- src/stacktraces.cpp | 2 +- src/statsd_client.cpp | 2 +- src/sync.cpp | 4 +-- src/test/addrman_tests.cpp | 2 +- src/test/allocator_tests.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 2 +- src/test/base64_tests.cpp | 2 +- src/test/bip32_tests.cpp | 4 +-- src/test/bip39_tests.cpp | 4 +-- src/test/blockfilter_tests.cpp | 2 +- src/test/bloom_tests.cpp | 4 +-- src/test/checkqueue_tests.cpp | 4 +-- src/test/coins_tests.cpp | 2 +- src/test/compress_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/denialofservice_tests.cpp | 2 +- src/test/getarg_tests.cpp | 2 +- src/test/governance_validators_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_io_tests.cpp | 2 +- src/test/key_tests.cpp | 4 +-- src/test/mempool_tests.cpp | 2 +- src/test/miner_tests.cpp | 4 +-- src/test/net_tests.cpp | 4 +-- src/test/netbase_tests.cpp | 2 +- src/test/policyestimator_tests.cpp | 2 +- src/test/pow_tests.cpp | 2 +- src/test/script_tests.cpp | 4 +-- src/test/sighash_tests.cpp | 4 +-- src/test/skiplist_tests.cpp | 2 +- src/test/transaction_tests.cpp | 2 +- src/test/txindex_tests.cpp | 4 +-- src/test/txvalidationcache_tests.cpp | 2 +- src/test/util_tests.cpp | 8 ++--- src/test/util_threadnames_tests.cpp | 2 +- src/timedata.cpp | 4 +-- src/torcontrol.cpp | 4 +-- src/txdb.cpp | 2 +- src/txmempool.cpp | 6 ++-- src/ui_interface.cpp | 2 +- src/uint256.cpp | 2 +- src/{utilasmap.cpp => util/asmap.cpp} | 0 src/{utilasmap.h => util/asmap.h} | 6 ++-- src/{utilmemory.h => util/memory.h} | 4 +-- src/{utilmoneystr.cpp => util/moneystr.cpp} | 4 +-- src/{utilmoneystr.h => util/moneystr.h} | 6 ++-- .../strencodings.cpp} | 4 +-- .../strencodings.h} | 6 ++-- src/{utilstring.cpp => util/string.cpp} | 2 +- src/{utilstring.h => util/string.h} | 6 ++-- src/{util.cpp => util/system.cpp} | 4 +-- src/{util.h => util/system.h} | 12 +++---- .../threadnames.cpp} | 2 +- src/{utilthreadnames.h => util/threadnames.h} | 4 +-- src/{utiltime.cpp => util/time.cpp} | 2 +- src/{utiltime.h => util/time.h} | 6 ++-- src/validation.cpp | 6 ++-- src/validationinterface.cpp | 2 +- src/wallet/coincontrol.cpp | 2 +- src/wallet/coinselection.cpp | 4 +-- src/wallet/crypter.cpp | 2 +- src/wallet/db.cpp | 2 +- src/wallet/db.h | 2 +- src/wallet/fees.cpp | 2 +- src/wallet/init.cpp | 4 +-- src/wallet/rpcdump.cpp | 4 +-- src/wallet/rpcwallet.cpp | 4 +-- src/wallet/test/wallet_crypto_tests.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 4 +-- src/wallet/walletdb.cpp | 4 +-- src/wallet/walletutil.h | 2 +- src/warnings.cpp | 2 +- src/zmq/zmqabstractnotifier.cpp | 2 +- src/zmq/zmqnotificationinterface.cpp | 2 +- src/zmq/zmqpublishnotifier.cpp | 2 +- test/lint/lint-circular-dependencies.sh | 10 +++--- test/lint/lint-format-strings.py | 4 +-- test/lint/lint-locale-dependence.sh | 24 +++++++------- 186 files changed, 306 insertions(+), 306 deletions(-) rename src/{utilasmap.cpp => util/asmap.cpp} (100%) rename src/{utilasmap.h => util/asmap.h} (75%) rename src/{utilmemory.h => util/memory.h} (89%) rename src/{utilmoneystr.cpp => util/moneystr.cpp} (97%) rename src/{utilmoneystr.h => util/moneystr.h} (87%) rename src/{utilstrencodings.cpp => util/strencodings.cpp} (99%) rename src/{utilstrencodings.h => util/strencodings.h} (98%) rename src/{utilstring.cpp => util/string.cpp} (88%) rename src/{utilstring.h => util/string.h} (96%) rename src/{util.cpp => util/system.cpp} (99%) rename src/{util.h => util/system.h} (98%) rename src/{utilthreadnames.cpp => util/threadnames.cpp} (98%) rename src/{utilthreadnames.h => util/threadnames.h} (88%) rename src/{utiltime.cpp => util/time.cpp} (99%) rename src/{utiltime.h => util/time.h} (93%) diff --git a/src/Makefile.am b/src/Makefile.am index 83690a9236376..43774c29fea39 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -260,13 +260,13 @@ BITCOIN_CORE_H = \ ui_interface.h \ undo.h \ unordered_lru_cache.h \ - util.h \ - utilasmap.h \ - utilmemory.h \ - utilmoneystr.h \ - utilstring.h \ - utiltime.h \ - utilthreadnames.h \ + util/system.h \ + util/asmap.h \ + util/memory.h \ + util/moneystr.h \ + util/string.h \ + util/time.h \ + util/threadnames.h \ validation.h \ validationinterface.h \ versionbits.h \ @@ -529,8 +529,8 @@ libdash_consensus_a_SOURCES = \ tinyformat.h \ uint256.cpp \ uint256.h \ - utilstrencodings.cpp \ - utilstrencodings.h \ + util/strencodings.cpp \ + util/strencodings.h \ version.h # common: shared between dashd, and dash-qt and non-server tools @@ -588,13 +588,13 @@ libdash_util_a_SOURCES = \ support/cleanse.cpp \ sync.cpp \ threadinterrupt.cpp \ - util.cpp \ - utilasmap.cpp \ - utilmoneystr.cpp \ - utilstrencodings.cpp \ - utiltime.cpp \ - utilstring.cpp \ - utilthreadnames.cpp \ + util/system.cpp \ + util/asmap.cpp \ + util/moneystr.cpp \ + util/strencodings.cpp \ + util/time.cpp \ + util/string.cpp \ + util/threadnames.cpp \ $(BITCOIN_CORE_H) if GLIBC_BACK_COMPAT diff --git a/src/addrdb.cpp b/src/addrdb.cpp index c7183b226c7da..4023cf7d0d0f0 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace { diff --git a/src/addrman.h b/src/addrman.h index 3c725a0172f39..26c03c4c7ae12 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index ea08dbf55d530..cdde91c568ee0 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/src/base58.cpp b/src/base58.cpp index f2f0f1373ea2e..306547ce1e2e8 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/batchedlogger.cpp b/src/batchedlogger.cpp index 009dc405dc652..55aaa7fec6d2f 100644 --- a/src/batchedlogger.cpp +++ b/src/batchedlogger.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include -#include +#include CBatchedLogger::CBatchedLogger(BCLog::LogFlags _category, const std::string& _header) : accept(LogAcceptCategory(_category)), header(_header) diff --git a/src/bench/bench_dash.cpp b/src/bench/bench_dash.cpp index fece0a9d263af..fcbc5f50ac107 100644 --- a/src/bench/bench_dash.cpp +++ b/src/bench/bench_dash.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/bench/bls.cpp b/src/bench/bls.cpp index 28f7cbef9d7af..8e1e92c2c0042 100644 --- a/src/bench/bls.cpp +++ b/src/bench/bls.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/src/bench/checkqueue.cpp b/src/bench/checkqueue.cpp index b0a92ab088793..1bb81809d91f3 100644 --- a/src/bench/checkqueue.cpp +++ b/src/bench/checkqueue.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include -#include +#include #include #include #include diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index 65377ac0cd34a..e2381cafc41df 100644 --- a/src/bench/crypto_hash.cpp +++ b/src/bench/crypto_hash.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/bench/examples.cpp b/src/bench/examples.cpp index 718dd6064a100..f54664c2a09fb 100644 --- a/src/bench/examples.cpp +++ b/src/bench/examples.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include // Sanity test: this should loop ten times, and // min/max/average should be close to 100ms. diff --git a/src/bench/string_cast.cpp b/src/bench/string_cast.cpp index da285c6e58b24..3cdb161d5534f 100644 --- a/src/bench/string_cast.cpp +++ b/src/bench/string_cast.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/src/bench/util_time.cpp b/src/bench/util_time.cpp index 94cef29ac9758..72d97354aa551 100644 --- a/src/bench/util_time.cpp +++ b/src/bench/util_time.cpp @@ -4,7 +4,7 @@ #include -#include +#include static void BenchTimeDeprecated(benchmark::State& state) { diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index daa3aa0b553b5..a2f132fe423f7 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include diff --git a/src/bls/bls.h b/src/bls/bls.h index c21e677f762d1..d1bace3218dfc 100644 --- a/src/bls/bls.h +++ b/src/bls/bls.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include // bls-dash uses relic, which may define DEBUG and ERROR, which leads to many warnings in some build setups #undef ERROR diff --git a/src/bls/bls_worker.cpp b/src/bls/bls_worker.cpp index 7707bd71e7198..5cf8aab1733be 100644 --- a/src/bls/bls_worker.cpp +++ b/src/bls/bls_worker.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 62ebee43aaee6..98395dfec67a7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 42fec52de0da0..fa504c4b6a845 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/checkqueue.h b/src/checkqueue.h index 1254852e6d87f..9112860c4e18e 100644 --- a/src/checkqueue.h +++ b/src/checkqueue.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/src/coinjoin/coinjoin-client-options.cpp b/src/coinjoin/coinjoin-client-options.cpp index 22e74e93fc3ff..738c54ba002ca 100644 --- a/src/coinjoin/coinjoin-client-options.cpp +++ b/src/coinjoin/coinjoin-client-options.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include diff --git a/src/coinjoin/coinjoin-client.cpp b/src/coinjoin/coinjoin-client.cpp index 77b9cf2115fd7..e03fdd349d098 100644 --- a/src/coinjoin/coinjoin-client.cpp +++ b/src/coinjoin/coinjoin-client.cpp @@ -15,8 +15,8 @@ #include #include