We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 755b7d8 commit 7882748Copy full SHA for 7882748
src/kernel/mempool_entry.h
@@ -127,8 +127,11 @@ class CTxMemPoolEntry
127
nModFeesWithAncestors{nFee},
128
nSigOpCostWithAncestors{sigOpCost} {}
129
130
+ // Prohibit accidental copies that might invalidate references from parent
131
+ // and child transactions, or lead to unsafe usage of mapTx.iterator_to.
132
CTxMemPoolEntry(ExplicitCopyTag, const CTxMemPoolEntry& entry) : CTxMemPoolEntry(entry) {}
133
CTxMemPoolEntry& operator=(const CTxMemPoolEntry&) = delete;
134
+ // The move constructor is already implicitly deleted, so be explicit about it.
135
CTxMemPoolEntry(CTxMemPoolEntry&&) = delete;
136
CTxMemPoolEntry& operator=(CTxMemPoolEntry&&) = delete;
137
0 commit comments