|
|
|
@ -740,7 +740,7 @@ struct DisconnectedBlockTransactions {
@@ -740,7 +740,7 @@ struct DisconnectedBlockTransactions {
|
|
|
|
|
void addTransaction(const CTransactionRef& tx) |
|
|
|
|
{ |
|
|
|
|
queuedTx.insert(tx); |
|
|
|
|
cachedInnerUsage += RecursiveDynamicUsage(*tx) + memusage::DynamicUsage(tx); |
|
|
|
|
cachedInnerUsage += RecursiveDynamicUsage(tx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Remove entries based on txid_index, and update memory usage.
|
|
|
|
@ -753,7 +753,7 @@ struct DisconnectedBlockTransactions {
@@ -753,7 +753,7 @@ struct DisconnectedBlockTransactions {
|
|
|
|
|
for (auto const &tx : vtx) { |
|
|
|
|
auto it = queuedTx.find(tx->GetHash()); |
|
|
|
|
if (it != queuedTx.end()) { |
|
|
|
|
cachedInnerUsage -= RecursiveDynamicUsage(**it) + memusage::DynamicUsage(*it); |
|
|
|
|
cachedInnerUsage -= RecursiveDynamicUsage(*it); |
|
|
|
|
queuedTx.erase(it); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -762,7 +762,7 @@ struct DisconnectedBlockTransactions {
@@ -762,7 +762,7 @@ struct DisconnectedBlockTransactions {
|
|
|
|
|
// Remove an entry by insertion_order index, and update memory usage.
|
|
|
|
|
void removeEntry(indexed_disconnected_transactions::index<insertion_order>::type::iterator entry) |
|
|
|
|
{ |
|
|
|
|
cachedInnerUsage -= RecursiveDynamicUsage(**entry) + memusage::DynamicUsage(*entry); |
|
|
|
|
cachedInnerUsage -= RecursiveDynamicUsage(*entry); |
|
|
|
|
queuedTx.get<insertion_order>().erase(entry); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|