aboutsummaryrefslogtreecommitdiff
path: root/src/serialization/binary_utils.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2021-01-24 07:42:57 +0000
committerLee Clagett <code@leeclagett.com>2021-01-23 06:23:39 +0000
commit08e4497c6e3b3f434c0bb255c3942648f153fe66 (patch)
tree2564f4214e9e66b2dc03ce3c788bb080b963be56 /src/serialization/binary_utils.h
parentMerge pull request #7669 (diff)
downloadmonero-08e4497c6e3b3f434c0bb255c3942648f153fe66.tar.xz
Improve cryptonote (block and tx) binary read performance
Diffstat (limited to 'src/serialization/binary_utils.h')
-rw-r--r--src/serialization/binary_utils.h3
1 files changed, 1 insertions, 2 deletions
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 <class T>
bool parse_binary(const std::string &blob, T &v)
{
- std::istringstream istr(blob);
- binary_archive<false> iar(istr);
+ binary_archive<false> iar{epee::strspan<std::uint8_t>(blob)};
return ::serialization::serialize(iar, v);
}