aboutsummaryrefslogtreecommitdiff
path: root/src/core_memusage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core_memusage.h')
-rw-r--r--src/core_memusage.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core_memusage.h b/src/core_memusage.h
index b8e0f08bbf..0dcc24c40c 100644
--- a/src/core_memusage.h
+++ b/src/core_memusage.h
@@ -69,8 +69,8 @@ static inline size_t RecursiveDynamicUsage(const CMutableTransaction& tx) {
static inline size_t RecursiveDynamicUsage(const CBlock& block) {
size_t mem = memusage::DynamicUsage(block.vtx);
- for (std::vector<CTransaction>::const_iterator it = block.vtx.begin(); it != block.vtx.end(); it++) {
- mem += RecursiveDynamicUsage(*it);
+ for (const auto& tx : block.vtx) {
+ mem += memusage::DynamicUsage(tx) + RecursiveDynamicUsage(*tx);
}
return mem;
}