Electroneum
Toggle main menu visibility
Loading...
Searching...
No Matches
BlockFuzzer Class Reference
Inheritance diagram for BlockFuzzer:
[
legend
]
Collaboration diagram for BlockFuzzer:
[
legend
]
Public Member Functions
virtual int
run
(const std::string &filename)
Public Member Functions inherited from
Fuzzer
virtual int
init
()
Detailed Description
Definition at line
37
of file
block.cpp
.
Member Function Documentation
◆
run()
int BlockFuzzer::run
(
const std::string &
filename
)
virtual
Implements
Fuzzer
.
Definition at line
45
of file
block.cpp
.
46
{
47
std::string s;
48
49
if
(!
epee::file_io_utils::load_file_to_string
(filename, s))
50
{
51
std::cout <<
"Error: failed to load file "
<< filename << std::endl;
52
return
1;
53
}
54
cryptonote::block b =
AUTO_VAL_INIT
(b);
55
if
(!
parse_and_validate_block_from_blob
(s, b))
56
{
57
std::cout <<
"Error: failed to parse block from file "
<< filename << std::endl;
58
return
1;
59
}
60
return
0;
61
}
AUTO_VAL_INIT
#define AUTO_VAL_INIT(v)
Definition
misc_language.h:53
cryptonote::parse_and_validate_block_from_blob
bool parse_and_validate_block_from_blob(const blobdata &b_blob, block &b, crypto::hash *block_hash)
Definition
cryptonote_format_utils.cpp:1257
epee::file_io_utils::load_file_to_string
bool load_file_to_string(const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
Definition
file_io_utils.h:130
Here is the call graph for this function:
The documentation for this class was generated from the following file:
/home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/fuzz/
block.cpp
BlockFuzzer
Generated on
for Electroneum by
1.17.0