diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-12-16 14:49:13 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-12-16 14:50:07 +0000 |
commit | 716012ca3a11969650c089fef1ca11ace871e4a5 (patch) | |
tree | 238c4c3ad2b993614349561415b397b67d481026 /src | |
parent | Merge pull request #6057 (diff) | |
download | monero-716012ca3a11969650c089fef1ca11ace871e4a5.tar.xz |
rpc: drop the obsolete and wrong "unpruned size" log
Since we now get pruned data in the first place, the "unpruned" data
size will in fact be the pruned data size, leading to confusion
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index dc93e7023..3d1d9901a 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -539,7 +539,7 @@ namespace cryptonote CHECK_PAYMENT_SAME_TS(req, res, bs.size() * COST_PER_BLOCK); - size_t pruned_size = 0, unpruned_size = 0, ntxes = 0; + size_t size = 0, ntxes = 0; res.blocks.reserve(bs.size()); res.output_indices.reserve(bs.size()); for(auto& bd: bs) @@ -547,8 +547,7 @@ namespace cryptonote res.blocks.resize(res.blocks.size()+1); res.blocks.back().pruned = req.prune; res.blocks.back().block = bd.first.first; - pruned_size += bd.first.first.size(); - unpruned_size += bd.first.first.size(); + size += bd.first.first.size(); res.output_indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices()); ntxes += bd.second.size(); res.output_indices.back().indices.reserve(1 + bd.second.size()); @@ -557,11 +556,10 @@ namespace cryptonote res.blocks.back().txs.reserve(bd.second.size()); for (std::vector<std::pair<crypto::hash, cryptonote::blobdata>>::iterator i = bd.second.begin(); i != bd.second.end(); ++i) { - unpruned_size += i->second.size(); res.blocks.back().txs.push_back({std::move(i->second), crypto::null_hash}); i->second.clear(); i->second.shrink_to_fit(); - pruned_size += res.blocks.back().txs.back().blob.size(); + size += res.blocks.back().txs.back().blob.size(); } const size_t n_txes_to_lookup = bd.second.size() + (req.no_miner_tx ? 0 : 1); @@ -584,7 +582,7 @@ namespace cryptonote } } - MDEBUG("on_get_blocks: " << bs.size() << " blocks, " << ntxes << " txes, pruned size " << pruned_size << ", unpruned size " << unpruned_size); + MDEBUG("on_get_blocks: " << bs.size() << " blocks, " << ntxes << " txes, size " << size); res.status = CORE_RPC_STATUS_OK; return true; } |