From b7823b8ec9c457d29f005db29cf4e56e1322c27c Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 6 Mar 2021 11:25:14 -0500 Subject: [PATCH] update to monero-project master, use epee byte_slice in json_to_binary() --- external/monero-project | 2 +- src/utils/monero_utils.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/external/monero-project b/external/monero-project index 8fef32e..7435392 160000 --- a/external/monero-project +++ b/external/monero-project @@ -1 +1 @@ -Subproject commit 8fef32e45c80aec41f25be9d1d8fb75adc883c64 +Subproject commit 7435392d785f3307d351e18b25675ae7695b4364 diff --git a/src/utils/monero_utils.cpp b/src/utils/monero_utils.cpp index 7c50cba..4261831 100644 --- a/src/utils/monero_utils.cpp +++ b/src/utils/monero_utils.cpp @@ -82,7 +82,9 @@ void monero_utils::validate_address(const std::string& address, monero_network_t void monero_utils::json_to_binary(const std::string &json, std::string &bin) { epee::serialization::portable_storage ps; ps.load_from_json(json); - ps.store_to_binary(bin); + epee::byte_slice bin_slice; + ps.store_to_binary(bin_slice); + bin.assign(reinterpret_cast(bin_slice.data()), bin_slice.size()); } void monero_utils::binary_to_json(const std::string &bin, std::string &json) {