aboutsummaryrefslogtreecommitdiff
path: root/tests/fuzz/cold-outputs.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-06-10 12:00:54 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-06-10 12:00:54 -0500
commit7499837a6fe8d3533e1360dce8f3ba230ff76042 (patch)
treecd3e089e2e09de33044220ff72461a761b028e3f /tests/fuzz/cold-outputs.cpp
parentMerge pull request #7729 (diff)
parentImprove cryptonote (block and tx) binary read performance (diff)
downloadmonero-7499837a6fe8d3533e1360dce8f3ba230ff76042.tar.xz
Merge pull request #7661
08e4497 Improve cryptonote (block and tx) binary read performance (Lee Clagett)
Diffstat (limited to 'tests/fuzz/cold-outputs.cpp')
-rw-r--r--tests/fuzz/cold-outputs.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/fuzz/cold-outputs.cpp b/tests/fuzz/cold-outputs.cpp
index bd298eb71..69eb7b61f 100644
--- a/tests/fuzz/cold-outputs.cpp
+++ b/tests/fuzz/cold-outputs.cpp
@@ -50,11 +50,8 @@ BEGIN_INIT_SIMPLE_FUZZER()
END_INIT_SIMPLE_FUZZER()
BEGIN_SIMPLE_FUZZER()
- std::string s((const char*)buf, len);
std::pair<uint64_t, std::vector<tools::wallet2::transfer_details>> outputs;
- std::stringstream iss;
- iss << s;
- binary_archive<false> ar(iss);
+ binary_archive<false> ar{{buf, len}};
::serialization::serialize(ar, outputs);
size_t n_outputs = wallet->import_outputs(outputs);
std::cout << boost::lexical_cast<std::string>(n_outputs) << " outputs imported" << std::endl;