update to monero-project master, use epee byte_slice in json_to_binary()

This commit is contained in:
woodser
2021-03-06 11:25:14 -05:00
parent c10fab3be9
commit b7823b8ec9
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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<const char*>(bin_slice.data()), bin_slice.size());
}
void monero_utils::binary_to_json(const std::string &bin, std::string &json) {