mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02: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:
@@ -20,7 +20,7 @@ void initialize_coincontrol()
|
||||
g_setup = testing_setup.get();
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(coincontrol, initialize_coincontrol)
|
||||
FUZZ_TARGET(coincontrol, .init = initialize_coincontrol)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
|
||||
const auto& node = g_setup->m_node;
|
||||
|
||||
@@ -25,7 +25,7 @@ void initialize_setup()
|
||||
g_wallet_ptr = std::make_unique<CWallet>(node.chain.get(), "", CreateMockableWalletDatabase());
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(wallet_fees, initialize_setup)
|
||||
FUZZ_TARGET(wallet_fees, .init = initialize_setup)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
const auto& node{g_setup->m_node};
|
||||
|
||||
@@ -79,7 +79,7 @@ struct FuzzedWallet {
|
||||
}
|
||||
};
|
||||
|
||||
FUZZ_TARGET_INIT(wallet_notifications, initialize_setup)
|
||||
FUZZ_TARGET(wallet_notifications, .init = initialize_setup)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
// The total amount, to be distributed to the wallets a and b in txs
|
||||
|
||||
Reference in New Issue
Block a user