aboutsummaryrefslogtreecommitdiff
path: root/src/coins.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-01-04 11:56:05 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2017-01-04 11:56:17 -0800
commit7dac1e5e9e887f5f6ff146e812a05bd3bf281eae (patch)
tree197aff6995a6824501578bbfd5afaa7e4c4d8479 /src/coins.h
parent0fc1c31a878e93d938c67db3f958e82e3c39659f (diff)
parentb50cd7a67e71051db59199a4185e7c82b669c659 (diff)
Merge #9107: Safer modify new coins
b50cd7a Fix dangerous condition in ModifyNewCoins. (Alex Morcos)
Diffstat (limited to 'src/coins.h')
-rw-r--r--src/coins.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/coins.h b/src/coins.h
index b1a2c08845..902cb57f69 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -269,6 +269,11 @@ struct CCoinsCacheEntry
enum Flags {
DIRTY = (1 << 0), // This cache entry is potentially different from the version in the parent view.
FRESH = (1 << 1), // The parent view does not have this entry (or it is pruned).
+ /* Note that FRESH is a performance optimization with which we can
+ * erase coins that are fully spent if we know we do not need to
+ * flush the changes to the parent cache. It is always safe to
+ * not mark FRESH if that condition is not guaranteed.
+ */
};
CCoinsCacheEntry() : coins(), flags(0) {}