Revert "addopt byte_slice"
This commit is contained in:
parent
18125278ae
commit
0f576100ae
19
src/page.h
19
src/page.h
|
@ -1446,22 +1446,17 @@ show_block_hex(size_t block_height, bool complete_blk)
|
||||||
return string {"Failed to obtain complete block data "};
|
return string {"Failed to obtain complete block data "};
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::string complete_block_data_str;
|
std::string complete_block_data_str;
|
||||||
epee::byte_slice complete_block_data_slice;
|
|
||||||
|
|
||||||
if(!epee::serialization::store_t_to_binary(
|
if(!epee::serialization::store_t_to_binary(
|
||||||
complete_block_data, complete_block_data_slice))
|
complete_block_data, complete_block_data_str))
|
||||||
{
|
{
|
||||||
cerr << "Failed to serialize complete_block_data\n";
|
cerr << "Failed to serialize complete_block_data\n";
|
||||||
return string {"Failed to obtain complete block data"};
|
return string {"Failed to obtain complete block data"};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string block_data_str(
|
|
||||||
complete_block_data_slice.begin(),
|
|
||||||
complete_block_data_slice.end());
|
|
||||||
|
|
||||||
return epee::string_tools
|
return epee::string_tools
|
||||||
::buff_to_hex_nodelimer(block_data_str);
|
::buff_to_hex_nodelimer(complete_block_data_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception const& e)
|
catch (std::exception const& e)
|
||||||
|
@ -1748,10 +1743,10 @@ show_ringmemberstx_jsonhex(string const& tx_hash_str)
|
||||||
return json {"error", "Failed to obtain complete block data "};
|
return json {"error", "Failed to obtain complete block data "};
|
||||||
}
|
}
|
||||||
|
|
||||||
epee::byte_slice complete_block_data_slice;
|
std::string complete_block_data_str;
|
||||||
|
|
||||||
if(!epee::serialization::store_t_to_binary(
|
if(!epee::serialization::store_t_to_binary(
|
||||||
complete_block_data, complete_block_data_slice))
|
complete_block_data, complete_block_data_str))
|
||||||
{
|
{
|
||||||
cerr << "Failed to serialize complete_block_data\n";
|
cerr << "Failed to serialize complete_block_data\n";
|
||||||
return json {"error", "Failed to obtain complete block data"};
|
return json {"error", "Failed to obtain complete block data"};
|
||||||
|
@ -1763,10 +1758,6 @@ show_ringmemberstx_jsonhex(string const& tx_hash_str)
|
||||||
tx_json["payment_id8"] = pod_to_hex(txd.payment_id8);
|
tx_json["payment_id8"] = pod_to_hex(txd.payment_id8);
|
||||||
tx_json["payment_id8e"] = pod_to_hex(txd.payment_id8);
|
tx_json["payment_id8e"] = pod_to_hex(txd.payment_id8);
|
||||||
|
|
||||||
std::string complete_block_data_str(
|
|
||||||
complete_block_data_slice.begin(),
|
|
||||||
complete_block_data_slice.end());
|
|
||||||
|
|
||||||
tx_json["block"] = epee::string_tools
|
tx_json["block"] = epee::string_tools
|
||||||
::buff_to_hex_nodelimer(complete_block_data_str);
|
::buff_to_hex_nodelimer(complete_block_data_str);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue