diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-10 17:26:00 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-19 17:51:09 -0800 |
commit | 1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (patch) | |
tree | 00b734409ca0ff817c36c000deae676df3cf16e2 /src/core_memusage.h | |
parent | da60506fc80f6a78f1b271a9a53b956b49b37234 (diff) |
Make CBlock::vtx a vector of shared_ptr<CTransaction>
Diffstat (limited to 'src/core_memusage.h')
-rw-r--r-- | src/core_memusage.h | 4 |
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; } |