mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
tests: Fuzz DecodeHexBlk(...)
This commit is contained in:
parent
117a706fab
commit
e57e67057a
1 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <core_io.h>
|
||||
#include <pubkey.h>
|
||||
#include <primitives/block.h>
|
||||
#include <rpc/util.h>
|
||||
#include <test/fuzz/fuzz.h>
|
||||
|
@ -15,6 +16,10 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
void initialize() {
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
}
|
||||
|
||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
{
|
||||
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;
|
||||
(void)DecodeHexBlockHeader(block_header, random_hex_string);
|
||||
CBlock block;
|
||||
(void)DecodeHexBlk(block, random_hex_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue