|
|
|
@ -2467,7 +2467,6 @@ namespace cryptonote
|
|
|
|
|
{
|
|
|
|
|
rpc::output_distribution_data data;
|
|
|
|
|
uint64_t amount;
|
|
|
|
|
std::string compressed_data;
|
|
|
|
|
bool binary;
|
|
|
|
|
bool compress;
|
|
|
|
|
|
|
|
|
@ -2476,31 +2475,24 @@ namespace cryptonote
|
|
|
|
|
KV_SERIALIZE_N(data.start_height, "start_height")
|
|
|
|
|
KV_SERIALIZE(binary)
|
|
|
|
|
KV_SERIALIZE(compress)
|
|
|
|
|
if (this_ref.binary)
|
|
|
|
|
if (this_ref.binary && this_ref.compress)
|
|
|
|
|
{
|
|
|
|
|
if (is_store)
|
|
|
|
|
{
|
|
|
|
|
if (this_ref.compress)
|
|
|
|
|
{
|
|
|
|
|
const_cast<std::string&>(this_ref.compressed_data) = compress_integer_array(this_ref.data.distribution);
|
|
|
|
|
KV_SERIALIZE(compressed_data)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
|
|
|
|
|
std::string compressed_data = compress_integer_array(this_ref.data.distribution);
|
|
|
|
|
epee::serialization::selector<is_store>::serialize(compressed_data, stg, hparent_section, "compressed_data");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (this_ref.compress)
|
|
|
|
|
{
|
|
|
|
|
KV_SERIALIZE(compressed_data)
|
|
|
|
|
const_cast<std::vector<uint64_t>&>(this_ref.data.distribution) = decompress_integer_array<uint64_t>(this_ref.compressed_data);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(data.distribution, "distribution")
|
|
|
|
|
std::string compressed_data;
|
|
|
|
|
epee::serialization::selector<is_store>::serialize(compressed_data, stg, hparent_section, "compressed_data");
|
|
|
|
|
this_ref.data.distribution = decompress_integer_array<uint64_t>(compressed_data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
KV_SERIALIZE_N(data.distribution, "distribution")
|
|
|
|
|
}
|
|
|
|
|
KV_SERIALIZE_N(data.base, "base")
|
|
|
|
|
END_KV_SERIALIZE_MAP()
|
|
|
|
|
};
|
|
|
|
|