Merge bitcoin/bitcoin#23491: scripted-diff: Move minisketchwrapper to src/node

faba1abe46 Sort file list after rename (MarcoFalke)
fa8f60e311 scripted-diff: Move minisketchwrapper to src/node (MarcoFalke)

Pull request description:

  The newly added wrapper is currently in the node library, but not placed in the node directory. While it is possible to use the wrapper outside of a node context (for example in a utility), it seems unlikely. Either way, I think the wrapper should either be moved to the util lib+dir or the node lib+dir, not something in-between.

  Also, fix incorrect comment `BITCOIN_DBWRAPPER_H`.

ACKs for top commit:
  fanquake:
    ACK faba1abe46. I saw the comment in #21515, however given there hasn't been any new activity there, I'm going to merge this now.

Tree-SHA512: fccc0cfd1fee661152a1378587b96795ffb7a7eceb6d2c27ea5401993fd8b9c0a92579fdba61203917ae6565269cb28d0973464fb6201dabf72a5143495d3e77
pull/826/head
fanquake 3 years ago
commit d0923098c6
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -167,7 +167,6 @@ BITCOIN_CORE_H = \
memusage.h \
merkleblock.h \
miner.h \
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 \
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 \

@ -64,11 +64,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 \
@ -76,8 +75,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 \
@ -87,6 +86,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 \
@ -98,13 +98,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 \
@ -124,6 +122,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 \
@ -135,21 +134,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

@ -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 <minisketchwrapper.h>
#include <node/minisketchwrapper.h>
#include <logging.h>
#include <util/time.h>

@ -2,10 +2,11 @@
// 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 <minisketch.h>
#include <cstddef>
#include <cstdint>
@ -14,4 +15,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

@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <minisketch.h>
#include <minisketchwrapper.h>
#include <node/minisketchwrapper.h>
#include <random.h>
#include <test/util/setup_common.h>

Loading…
Cancel
Save