pull/7969/merge
selsta 2 months ago committed by GitHub
commit b12458fdff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -309,6 +309,10 @@ namespace cryptonote
else
KV_SERIALIZE_OPT(cumulative_difficulty_top64, (uint64_t)0)
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(m_block_ids)
// backward incompatible portable encoding
KV_SERIALIZE_N(m_block_weights, "m_block_weights_")
// inefficient and simple backward compatibility
// TODO: can be removed after v15+ hf
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(m_block_weights)
KV_SERIALIZE(first_block)
END_KV_SERIALIZE_MAP()
@ -352,6 +356,10 @@ namespace cryptonote
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_VAL_POD_AS_BLOB(block_hash)
KV_SERIALIZE(current_blockchain_height)
// backward incompatible portable encoding
KV_SERIALIZE_N(missing_tx_indices, "missing_tx_indices_")
// inefficient and simple backward compatibility
// TODO: can be removed after v15+ hf
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(missing_tx_indices)
END_KV_SERIALIZE_MAP()
};

@ -3387,7 +3387,7 @@ namespace cryptonote
return false;
}
res.distributions.push_back({std::move(*data), amount, "", req.binary, req.compress});
res.distributions.push_back({std::move(*data), amount, req.binary, true});
}
}
catch (const std::exception &e)
@ -3441,7 +3441,7 @@ namespace cryptonote
return true;
}
res.distributions.push_back({std::move(*data), amount, "", req.binary, req.compress});
res.distributions.push_back({std::move(*data), amount, req.binary, true});
}
}
catch (const std::exception &e)

@ -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()
};

@ -8633,6 +8633,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
req_t.to_height = segregation_fork_height + 1;
req_t.cumulative = true;
req_t.binary = true;
req_t.compress = true;
{
const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex};

Loading…
Cancel
Save