mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
fuzz: Move CTxDestination fuzzing to script fuzz target
No need to split it over several targets
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
#include <pow.h>
|
||||
#include <protocol.h>
|
||||
#include <pubkey.h>
|
||||
#include <rpc/util.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <script/standard.h>
|
||||
#include <serialize.h>
|
||||
#include <streams.h>
|
||||
@@ -158,20 +156,6 @@ FUZZ_TARGET_INIT(integer, initialize_integer)
|
||||
|
||||
const CKeyID key_id{u160};
|
||||
const CScriptID script_id{u160};
|
||||
// CTxDestination = CNoDestination ∪ PKHash ∪ ScriptHash ∪ WitnessV0ScriptHash ∪ WitnessV0KeyHash ∪ WitnessUnknown
|
||||
const PKHash pk_hash{u160};
|
||||
const ScriptHash script_hash{u160};
|
||||
const WitnessV0KeyHash witness_v0_key_hash{u160};
|
||||
const WitnessV0ScriptHash witness_v0_script_hash{u256};
|
||||
const std::vector<CTxDestination> destinations{pk_hash, script_hash, witness_v0_key_hash, witness_v0_script_hash};
|
||||
const SigningProvider store;
|
||||
for (const CTxDestination& destination : destinations) {
|
||||
(void)DescribeAddress(destination);
|
||||
(void)EncodeDestination(destination);
|
||||
(void)GetKeyForDestination(store, destination);
|
||||
(void)GetScriptForDestination(destination);
|
||||
(void)IsValidDestination(destination);
|
||||
}
|
||||
|
||||
{
|
||||
CDataStream stream(SER_NETWORK, INIT_PROTO_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user