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/serialization/binary_utils.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/serialization/binary_utils.h') diff --git a/src/serialization/binary_utils.h b/src/serialization/binary_utils.h index 8635585af..8444f220e 100644 --- a/src/serialization/binary_utils.h +++ b/src/serialization/binary_utils.h @@ -39,8 +39,7 @@ namespace serialization { template bool parse_binary(const std::string &blob, T &v) { - std::istringstream istr(blob); - binary_archive iar(istr); + binary_archive iar{epee::strspan(blob)}; return ::serialization::serialize(iar, v); } -- cgit v1.2.3