Skip to content

Commit c53e95f

Browse files
committed
Merge bitcoin/bitcoin#23137: Move-only: bloom to src/common
fa2d611 style: Sort (MarcoFalke) fa1e5de scripted-diff: Move bloom to src/common (MarcoFalke) fac303c refactor: Remove unused MakeUCharSpan (MarcoFalke) Pull request description: To avoid having all files at the top level `./src` directory, start moving them to their respective sub directory according to bitcoin/bitcoin#15732. `bloom` currently depends on libconsensus (`CTransaction`, `CScript`, ...) and it is currently located in the libcommon. Thus, move it to `src/common/`. (libutil in `src/util/` is for stuff that doesn't depend on libconsensus). ACKs for top commit: theStack: Code-review ACK fa2d611 ryanofsky: Code review ACK fa2d611 fanquake: ACK fa2d611 - source shuffle starts now. Tree-SHA512: d2fbc31b81741e9f0be539e1149542c9ca39958c240e12e8e757d882beccd0f0debdc10dcce146a05f03ef9f5c6247900a461a7a4799b515e8716dfb9af1fde2
2 parents 4229f71 + fa2d611 commit c53e95f

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ BITCOIN_CORE_H = \
114114
bech32.h \
115115
blockencodings.h \
116116
blockfilter.h \
117-
bloom.h \
118117
chain.h \
119118
chainparams.h \
120119
chainparamsbase.h \
121120
chainparamsseeds.h \
122121
checkqueue.h \
123122
clientversion.h \
124123
coins.h \
124+
common/bloom.h \
125125
compat.h \
126126
compat/assumptions.h \
127127
compat/byteswap.h \
@@ -529,9 +529,9 @@ libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
529529
libbitcoin_common_a_SOURCES = \
530530
base58.cpp \
531531
bech32.cpp \
532-
bloom.cpp \
533532
chainparams.cpp \
534533
coins.cpp \
534+
common/bloom.cpp \
535535
compressor.cpp \
536536
core_read.cpp \
537537
core_write.cpp \

src/banman.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define BITCOIN_BANMAN_H
77

88
#include <addrdb.h>
9-
#include <bloom.h>
9+
#include <common/bloom.h>
1010
#include <fs.h>
1111
#include <net_types.h> // For banmap_t
1212
#include <sync.h>

src/bench/rollingbloom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
#include <bench/bench.h>
7-
#include <bloom.h>
7+
#include <common/bloom.h>
88

99
static void RollingBloom(benchmark::Bench& bench)
1010
{

src/bloom.cpp renamed to src/common/bloom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <bloom.h>
5+
#include <common/bloom.h>
66

77
#include <hash.h>
88
#include <primitives/transaction.h>
@@ -82,7 +82,7 @@ bool CBloomFilter::contains(const COutPoint& outpoint) const
8282
{
8383
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
8484
stream << outpoint;
85-
return contains(MakeUCharSpan(stream));
85+
return contains(stream);
8686
}
8787

8888
bool CBloomFilter::IsWithinSizeConstraints() const

src/bloom.h renamed to src/common/bloom.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_BLOOM_H
6-
#define BITCOIN_BLOOM_H
5+
#ifndef BITCOIN_COMMON_BLOOM_H
6+
#define BITCOIN_COMMON_BLOOM_H
77

88
#include <serialize.h>
99
#include <span.h>
@@ -124,4 +124,4 @@ class CRollingBloomFilter
124124
int nHashFuncs;
125125
};
126126

127-
#endif // BITCOIN_BLOOM_H
127+
#endif // BITCOIN_COMMON_BLOOM_H

src/merkleblock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
#ifndef BITCOIN_MERKLEBLOCK_H
77
#define BITCOIN_MERKLEBLOCK_H
88

9+
#include <common/bloom.h>
10+
#include <primitives/block.h>
911
#include <serialize.h>
1012
#include <uint256.h>
11-
#include <primitives/block.h>
12-
#include <bloom.h>
1313

1414
#include <vector>
1515

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#define BITCOIN_NET_H
88

99
#include <addrman.h>
10-
#include <bloom.h>
1110
#include <chainparams.h>
11+
#include <common/bloom.h>
1212
#include <compat.h>
1313
#include <consensus/amount.h>
1414
#include <crypto/siphash.h>

src/test/bloom_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <bloom.h>
5+
#include <common/bloom.h>
66

77
#include <clientversion.h>
88
#include <key.h>

src/test/fuzz/bloom_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <bloom.h>
5+
#include <common/bloom.h>
66
#include <primitives/transaction.h>
77
#include <test/fuzz/FuzzedDataProvider.h>
88
#include <test/fuzz/fuzz.h>

src/test/fuzz/rolling_bloom_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <bloom.h>
5+
#include <common/bloom.h>
66
#include <test/fuzz/FuzzedDataProvider.h>
77
#include <test/fuzz/fuzz.h>
88
#include <test/fuzz/util.h>

0 commit comments

Comments
 (0)