2019-10-01 07:26:20 -03:00
|
|
|
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#include <chainparams.h>
|
2019-12-06 15:25:51 -03:00
|
|
|
#include <pubkey.h>
|
2019-10-01 07:26:20 -03:00
|
|
|
#include <script/descriptor.h>
|
|
|
|
#include <test/fuzz/fuzz.h>
|
2019-12-06 15:25:51 -03:00
|
|
|
#include <util/memory.h>
|
2019-10-01 07:26:20 -03:00
|
|
|
|
|
|
|
void initialize()
|
|
|
|
{
|
2020-03-10 09:55:41 -03:00
|
|
|
static const ECCVerifyHandle verify_handle;
|
2019-10-01 07:26:20 -03:00
|
|
|
SelectParams(CBaseChainParams::REGTEST);
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_one_input(const std::vector<uint8_t>& buffer)
|
|
|
|
{
|
|
|
|
const std::string descriptor(buffer.begin(), buffer.end());
|
|
|
|
FlatSigningProvider signing_provider;
|
|
|
|
std::string error;
|
|
|
|
for (const bool require_checksum : {true, false}) {
|
|
|
|
Parse(descriptor, signing_provider, error, require_checksum);
|
|
|
|
}
|
|
|
|
}
|