mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
scripted-diff: Use new FUZZ_TARGET macro everywhere
-BEGIN VERIFY SCRIPT-
ren() { sed --regexp-extended -i "s|$1|$2|g" $(git grep -l --extended-regexp "$1"); }
# Replace FUZZ_TARGET_INIT
ren 'FUZZ_TARGET_INIT\((.+), (.+)\)' 'FUZZ_TARGET(\1, .init = \2)'
# Delete unused FUZZ_TARGET_INIT
sed -i -e '37,39d' src/test/fuzz/fuzz.h
-END VERIFY SCRIPT-
This commit is contained in:
@@ -35,7 +35,7 @@ void initialize_key()
|
||||
SelectParams(ChainType::REGTEST);
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(key, initialize_key)
|
||||
FUZZ_TARGET(key, .init = initialize_key)
|
||||
{
|
||||
const CKey key = [&] {
|
||||
CKey k;
|
||||
@@ -308,7 +308,7 @@ FUZZ_TARGET_INIT(key, initialize_key)
|
||||
}
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(ellswift_roundtrip, initialize_key)
|
||||
FUZZ_TARGET(ellswift_roundtrip, .init = initialize_key)
|
||||
{
|
||||
FuzzedDataProvider fdp{buffer.data(), buffer.size()};
|
||||
|
||||
@@ -327,7 +327,7 @@ FUZZ_TARGET_INIT(ellswift_roundtrip, initialize_key)
|
||||
assert(key.VerifyPubKey(decoded_pubkey));
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(bip324_ecdh, initialize_key)
|
||||
FUZZ_TARGET(bip324_ecdh, .init = initialize_key)
|
||||
{
|
||||
FuzzedDataProvider fdp{buffer.data(), buffer.size()};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user