Skip to content

Commit

Permalink
Merge pull request #5702 from ogabrielides/bitcoin_backport_24946
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta authored Nov 19, 2023
2 parents 105acfd + 5a4406e commit 722d14c
Show file tree
Hide file tree
Showing 17 changed files with 927 additions and 228 deletions.
4 changes: 3 additions & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ BITCOIN_TESTS =\
test/validation_chainstatemanager_tests.cpp \
test/validation_flush_tests.cpp \
test/validationinterface_tests.cpp \
test/versionbits_tests.cpp
test/versionbits_tests.cpp \
test/xoroshiro128plusplus_tests.cpp

if ENABLE_WALLET
BITCOIN_TESTS += \
Expand Down Expand Up @@ -254,6 +255,7 @@ test_fuzz_fuzz_SOURCES = \
test/fuzz/crypto_chacha20.cpp \
test/fuzz/crypto_chacha20_poly1305_aead.cpp \
test/fuzz/crypto_common.cpp \
test/fuzz/crypto_diff_fuzz_chacha20.cpp \
test/fuzz/crypto_hkdf_hmac_sha256_l32.cpp \
test/fuzz/crypto_poly1305.cpp \
test/fuzz/cuckoocache.cpp \
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.test_util.include
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ TEST_UTIL_H = \
test/util/setup_common.h \
test/util/str.h \
test/util/transaction_utils.h \
test/util/wallet.h
test/util/wallet.h \
test/util/xoroshiro128plusplus.h

libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
Expand Down
4 changes: 2 additions & 2 deletions src/bench/chacha20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ static const uint64_t BUFFER_SIZE_LARGE = 1024*1024;
static void CHACHA20(benchmark::Bench& bench, size_t buffersize)
{
std::vector<uint8_t> key(32,0);
ChaCha20 ctx(key.data(), key.size());
ChaCha20 ctx(key.data());
ctx.SetIV(0);
ctx.Seek(0);
ctx.Seek64(0);
std::vector<uint8_t> in(buffersize,0);
std::vector<uint8_t> out(buffersize,0);
bench.batch(in.size()).unit("byte").run([&] {
Expand Down
Loading

0 comments on commit 722d14c

Please sign in to comment.