diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-29 15:19:01 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-09-29 15:19:07 +0200 |
commit | 829c441af2f06c2ac33423d4385f0d99a68e99c0 (patch) | |
tree | 6141fbc3dfb8361a5f6474e95c60feb7cbe98254 /src/consensus | |
parent | d648bbb0a7909aed953b6f7907690134606a033a (diff) | |
parent | a11da7541148b5bb8e293c0ee49b2856a6628099 (diff) |
Merge bitcoin/bitcoin#23115: bloom: use Span instead of std::vector for `insert` and `contains`
a11da7541148b5bb8e293c0ee49b2856a6628099 bloom: cleanup includes (fanquake)
f1ed1d3194d4160923f3b02fa1acffd805ab4428 bloom: use constexpr where appropriate (fanquake)
2ba4ddf31d27bebc144b3729479967b40bbe0b6a bloom: use Span instead of std::vector for `insert` and `contains` (William Casarin)
Pull request description:
This is #18985 rebased, with the most recent comments addressed.
> We can avoid many unnecessary std::vector allocations by changing
CBloomFilter to take Spans instead of std::vector's for the `insert`
and `contains` operations.
> CBloomFilter currently converts types such as CDataStream and uint256
to std::vector on `insert` and `contains`. This is unnecessary because
CDataStreams and uint256 are already std::vectors internally. We just
need a way to point to the right data within those types. Span gives
us this ability.
ACKs for top commit:
sipa:
Code review ACK a11da7541148b5bb8e293c0ee49b2856a6628099
laanwj:
Code review ACK a11da7541148b5bb8e293c0ee49b2856a6628099
Tree-SHA512: ee9ba02c9588daa1ff51782d1953fd060839dd15aa85861b2633b6ff2398320188ddd00f01d0c99442224485364ede9f8322366de4239fc7831ebfa06bd34659
Diffstat (limited to 'src/consensus')
0 files changed, 0 insertions, 0 deletions