From 08e4497c6e3b3f434c0bb255c3942648f153fe66 Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Sun, 24 Jan 2021 07:42:57 +0000 Subject: Improve cryptonote (block and tx) binary read performance --- src/blockchain_utilities/blockchain_blackball.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/blockchain_utilities/blockchain_blackball.cpp') diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp index 18a37434c..d53251fd3 100644 --- a/src/blockchain_utilities/blockchain_blackball.cpp +++ b/src/blockchain_utilities/blockchain_blackball.cpp @@ -388,9 +388,7 @@ static bool for_all_transactions(const std::string &filename, uint64_t &start_id cryptonote::transaction_prefix tx; blobdata bd; bd.assign(reinterpret_cast(v.mv_data), v.mv_size); - std::stringstream ss; - ss << bd; - binary_archive ba(ss); + binary_archive ba{epee::strspan(bd)}; bool r = do_serialize(ba, tx); CHECK_AND_ASSERT_MES(r, false, "Failed to parse transaction from blob"); -- cgit v1.2.3