mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
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
This commit is contained in:
parent
b4e1dc83d2
commit
716012ca3a
1 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue