mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-31 18:22:04 +02:00
tests: Fuzz DecodeHexBlk(...)
This commit is contained in:
parent
117a706fab
commit
e57e67057a
@ -3,6 +3,7 @@
|
|||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <core_io.h>
|
#include <core_io.h>
|
||||||
|
#include <pubkey.h>
|
||||||
#include <primitives/block.h>
|
#include <primitives/block.h>
|
||||||
#include <rpc/util.h>
|
#include <rpc/util.h>
|
||||||
#include <test/fuzz/fuzz.h>
|
#include <test/fuzz/fuzz.h>
|
||||||
@ -15,6 +16,10 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
void initialize() {
|
||||||
|
static const ECCVerifyHandle verify_handle;
|
||||||
|
}
|
||||||
|
|
||||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
{
|
{
|
||||||
const std::string random_hex_string(buffer.begin(), buffer.end());
|
const std::string random_hex_string(buffer.begin(), buffer.end());
|
||||||
@ -33,4 +38,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||||||
}
|
}
|
||||||
CBlockHeader block_header;
|
CBlockHeader block_header;
|
||||||
(void)DecodeHexBlockHeader(block_header, random_hex_string);
|
(void)DecodeHexBlockHeader(block_header, random_hex_string);
|
||||||
|
CBlock block;
|
||||||
|
(void)DecodeHexBlk(block, random_hex_string);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user