mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 15:36:19 +01:00
refactor: move util::Xor to Obfuscation().Xor
This is meant to focus the usages to narrow the scope of the obfuscation optimization. `Obfuscation::Xor` is mostly a move. Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <random.h>
|
||||
#include <streams.h>
|
||||
#include <util/obfuscation.h>
|
||||
|
||||
#include <cstddef>
|
||||
@@ -18,7 +17,7 @@ static void ObfuscationBench(benchmark::Bench& bench)
|
||||
|
||||
size_t offset{0};
|
||||
bench.batch(data.size()).unit("byte").run([&] {
|
||||
util::Xor(data, key, offset++); // mutated differently each time
|
||||
Obfuscation().Xor(data, key, offset++); // mutated differently each time
|
||||
ankerl::nanobench::doNotOptimizeAway(data);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user