Conversation
src/Makefile.test_fuzz.include
Outdated
There was a problem hiding this comment.
I wonder if we can nest more folders. Maybe src/test/fuzz/util/mempool.cpp to differentiate utils from tests?
src/test/fuzz/mempool_utils.cpp
Outdated
There was a problem hiding this comment.
unrelated:
| const CAmount fee = std::min<CAmount>(ConsumeMoney(fuzzed_data_provider), std::numeric_limits<CAmount>::max() / static_cast<CAmount>(100000)); | |
| const CAmount fee{ConsumeMoney(fuzzed_data_provider, /*max=*/std::numeric_limits<CAmount>::max() / CAmount{100'000})}; |
It should be possible to just pass the max. (Can do in a separate commit, if you want)
There was a problem hiding this comment.
Added another commit for this.
53366df to
6703800
Compare
Moving the mempool code (Boost) out of util.h, results in a ~10% speedup (for me) when compiling the fuzz tests.
6703800 to
8a6b6df
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
maflcko
left a comment
There was a problem hiding this comment.
review ACK 8a6b6df 🍮
Show signature
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
review ACK 8a6b6dfcd8d26b62c3a13beba72440635fcc5e19 🍮
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUgJuAv+MyuzOk4R07Q6iwAbpfd78pnXvv/5J2YAj5mpWWifj9ZAJL72sYk/K1I8
5K4ukFrthMelgGVV7Hkz7KcSEQu/rRpjHRRILFuYsnxGwhVYi4RCH0w+s4jrotBc
onA2qBJaft8ULZtZg1wDS+Lkl8VLQ9bwkYmUkZgJf9vaUQwMYFlO70QkqidubjcR
+lslpo9UkFD4uH8q9YLClPvGWWxpjB/6x8/CKDEVt7Yfu1cQypX6kmgrG4T2Kmgi
6FrJDAM0ECts/di/V1TLhRsGdQrSMhDxx0UawygzgaLTBc38ezG7sE17ram+ems+
cpE+mDhWu56QWG6hCrpIyRH2pkDcjymAwIjfEug9EromErGocKKpY1nK5BVaqNbl
KKhrNnZ4x+DBhvgBxCiGzfGFP2oGgDAKPY4Ke22LjdpdC1szqBcLMdWVyPCKrJBc
VzypwHcwe8rGkqZaVmGzIGB7PSEfJCEhvscA31Z7vFBsuHqTiz/OROgV+J4+/qPr
fQ8WY0tK
=GxLp
-----END PGP SIGNATURE-----
| #define BITCOIN_TEST_FUZZ_UTIL_MEMPOOL_H | ||
|
|
||
| #include <primitives/transaction.h> | ||
| #include <test/fuzz/FuzzedDataProvider.h> |
There was a problem hiding this comment.
those two includes could be fwd-decls, but it doesn't matter because everywhere where this header is included, the full includes already exist
Moving the heavy (Boost) mempool code out of fuzz/util.h. Means that (for ex) a crypto_common fuzz unit doesn't need to care about seeing endless Boost headers. This results in a ~10% speedup (for me) when compiling the fuzz tests. Your results may vary.