mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
refactor: Hand-replace some uint256S -> uint256
chainparams.cpp - workaround for MSVC bug triggering C7595 - Calling consteval constructors in initializer lists fails, but works on GCC (13.2.0) & Clang (17.0.6).
This commit is contained in:
@@ -20,7 +20,7 @@ FUZZ_TARGET(muhash)
|
||||
muhash.Insert(data);
|
||||
muhash.Insert(data2);
|
||||
|
||||
const std::string initial_state_hash{"dd5ad2a105c2d29495f577245c357409002329b9f4d6182c0af3dc2f462555c8"};
|
||||
constexpr uint256 initial_state_hash{"dd5ad2a105c2d29495f577245c357409002329b9f4d6182c0af3dc2f462555c8"};
|
||||
uint256 out;
|
||||
uint256 out2;
|
||||
CallOneOf(
|
||||
@@ -57,14 +57,14 @@ FUZZ_TARGET(muhash)
|
||||
#endif
|
||||
|
||||
muhash.Finalize(out);
|
||||
out2 = uint256S(initial_state_hash);
|
||||
out2 = initial_state_hash;
|
||||
},
|
||||
[&] {
|
||||
// Test that removing all added elements brings the object back to it's initial state
|
||||
muhash.Remove(data);
|
||||
muhash.Remove(data2);
|
||||
muhash.Finalize(out);
|
||||
out2 = uint256S(initial_state_hash);
|
||||
out2 = initial_state_hash;
|
||||
});
|
||||
assert(out == out2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user