From fa8f60e31102e1153ad1452fbced51e54487a3d4 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 12 Nov 2021 10:19:33 +0100 Subject: [PATCH 1/2] scripted-diff: Move minisketchwrapper to src/node -BEGIN VERIFY SCRIPT- # Move module git mv src/minisketchwrapper.cpp src/node/ git mv src/minisketchwrapper.h src/node/ # Replacements sed -i 's:minisketchwrapper:node/minisketchwrapper:g' $(git grep -l minisketchwrapper) sed -i 's:MINISKETCHWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' $(git grep -l MINISKETCHWRAPPER_H) sed -i 's:DBWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' ./src/node/minisketchwrapper.h -END VERIFY SCRIPT- --- src/Makefile.am | 4 ++-- src/{ => node}/minisketchwrapper.cpp | 2 +- src/{ => node}/minisketchwrapper.h | 6 +++--- src/test/minisketch_tests.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/{ => node}/minisketchwrapper.cpp (98%) rename src/{ => node}/minisketchwrapper.h (79%) diff --git a/src/Makefile.am b/src/Makefile.am index 85450149cf6..3e5b04b6684 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -167,7 +167,7 @@ BITCOIN_CORE_H = \ memusage.h \ merkleblock.h \ miner.h \ - minisketchwrapper.h \ + node/minisketchwrapper.h \ net.h \ net_permissions.h \ net_processing.h \ @@ -335,7 +335,7 @@ libbitcoin_server_a_SOURCES = \ init.cpp \ mapport.cpp \ miner.cpp \ - minisketchwrapper.cpp \ + node/minisketchwrapper.cpp \ net.cpp \ net_processing.cpp \ node/blockstorage.cpp \ diff --git a/src/minisketchwrapper.cpp b/src/node/minisketchwrapper.cpp similarity index 98% rename from src/minisketchwrapper.cpp rename to src/node/minisketchwrapper.cpp index fb176fb1533..572df63463a 100644 --- a/src/minisketchwrapper.cpp +++ b/src/node/minisketchwrapper.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include +#include #include #include diff --git a/src/minisketchwrapper.h b/src/node/minisketchwrapper.h similarity index 79% rename from src/minisketchwrapper.h rename to src/node/minisketchwrapper.h index 409221de79a..426781d5086 100644 --- a/src/minisketchwrapper.h +++ b/src/node/minisketchwrapper.h @@ -2,8 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_MINISKETCHWRAPPER_H -#define BITCOIN_MINISKETCHWRAPPER_H +#ifndef BITCOIN_NODE_MINISKETCHWRAPPER_H +#define BITCOIN_NODE_MINISKETCHWRAPPER_H #include #include @@ -14,4 +14,4 @@ Minisketch MakeMinisketch32(size_t capacity); /** Wrapper around Minisketch::CreateFP. */ Minisketch MakeMinisketch32FP(size_t max_elements, uint32_t fpbits); -#endif // BITCOIN_DBWRAPPER_H +#endif // BITCOIN_NODE_MINISKETCHWRAPPER_H diff --git a/src/test/minisketch_tests.cpp b/src/test/minisketch_tests.cpp index 6798331936d..f7dd18923b1 100644 --- a/src/test/minisketch_tests.cpp +++ b/src/test/minisketch_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include -#include +#include #include #include From faba1abe469833b2dad01bac4e4d8a4ebb4bc97a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 12 Nov 2021 10:59:36 +0100 Subject: [PATCH 2/2] Sort file list after rename --- src/Makefile.am | 4 ++-- src/Makefile.test.include | 18 +++++++++--------- src/node/minisketchwrapper.h | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 3e5b04b6684..b0b37e0612f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -167,7 +167,6 @@ BITCOIN_CORE_H = \ memusage.h \ merkleblock.h \ miner.h \ - node/minisketchwrapper.h \ net.h \ net_permissions.h \ net_processing.h \ @@ -179,6 +178,7 @@ BITCOIN_CORE_H = \ node/coin.h \ node/coinstats.h \ node/context.h \ + node/minisketchwrapper.h \ node/psbt.h \ node/transaction.h \ node/ui_interface.h \ @@ -335,7 +335,6 @@ libbitcoin_server_a_SOURCES = \ init.cpp \ mapport.cpp \ miner.cpp \ - node/minisketchwrapper.cpp \ net.cpp \ net_processing.cpp \ node/blockstorage.cpp \ @@ -343,6 +342,7 @@ libbitcoin_server_a_SOURCES = \ node/coinstats.cpp \ node/context.cpp \ node/interfaces.cpp \ + node/minisketchwrapper.cpp \ node/psbt.cpp \ node/transaction.cpp \ node/ui_interface.cpp \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index da4b85665f7..b41c1bca61c 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -63,11 +63,10 @@ endif # test_bitcoin binary # BITCOIN_TESTS =\ - test/arith_uint256_tests.cpp \ - test/scriptnum10.h \ test/addrman_tests.cpp \ - test/amount_tests.cpp \ test/allocator_tests.cpp \ + test/amount_tests.cpp \ + test/arith_uint256_tests.cpp \ test/base32_tests.cpp \ test/base58_tests.cpp \ test/base64_tests.cpp \ @@ -75,8 +74,8 @@ BITCOIN_TESTS =\ test/bip32_tests.cpp \ test/blockchain_tests.cpp \ test/blockencodings_tests.cpp \ - test/blockfilter_tests.cpp \ test/blockfilter_index_tests.cpp \ + test/blockfilter_tests.cpp \ test/bloom_tests.cpp \ test/bswap_tests.cpp \ test/checkqueue_tests.cpp \ @@ -86,6 +85,7 @@ BITCOIN_TESTS =\ test/compress_tests.cpp \ test/crypto_tests.cpp \ test/cuckoocache_tests.cpp \ + test/dbwrapper_tests.cpp \ test/denialofservice_tests.cpp \ test/descriptor_tests.cpp \ test/flatfile_tests.cpp \ @@ -97,13 +97,11 @@ BITCOIN_TESTS =\ test/key_io_tests.cpp \ test/key_tests.cpp \ test/logging_tests.cpp \ - test/dbwrapper_tests.cpp \ - test/validation_tests.cpp \ test/mempool_tests.cpp \ test/merkle_tests.cpp \ test/merkleblock_tests.cpp \ - test/minisketch_tests.cpp \ test/miner_tests.cpp \ + test/minisketch_tests.cpp \ test/multisig_tests.cpp \ test/net_peer_eviction_tests.cpp \ test/net_tests.cpp \ @@ -123,6 +121,7 @@ BITCOIN_TESTS =\ test/script_parse_tests.cpp \ test/script_standard_tests.cpp \ test/script_tests.cpp \ + test/scriptnum10.h \ test/scriptnum_tests.cpp \ test/serfloat_tests.cpp \ test/serialize_tests.cpp \ @@ -134,21 +133,22 @@ BITCOIN_TESTS =\ test/streams_tests.cpp \ test/sync_tests.cpp \ test/system_tests.cpp \ - test/util_threadnames_tests.cpp \ test/timedata_tests.cpp \ test/torcontrol_tests.cpp \ test/transaction_tests.cpp \ test/txindex_tests.cpp \ - test/txrequest_tests.cpp \ test/txpackage_tests.cpp \ + test/txrequest_tests.cpp \ test/txvalidation_tests.cpp \ test/txvalidationcache_tests.cpp \ test/uint256_tests.cpp \ test/util_tests.cpp \ + test/util_threadnames_tests.cpp \ test/validation_block_tests.cpp \ test/validation_chainstate_tests.cpp \ test/validation_chainstatemanager_tests.cpp \ test/validation_flush_tests.cpp \ + test/validation_tests.cpp \ test/validationinterface_tests.cpp \ test/versionbits_tests.cpp diff --git a/src/node/minisketchwrapper.h b/src/node/minisketchwrapper.h index 426781d5086..a8aef68d014 100644 --- a/src/node/minisketchwrapper.h +++ b/src/node/minisketchwrapper.h @@ -6,6 +6,7 @@ #define BITCOIN_NODE_MINISKETCHWRAPPER_H #include + #include #include