aboutsummaryrefslogtreecommitdiff
path: root/src/core.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-10-26 21:26:29 +0200
committerPieter Wuille <sipa@ulyssis.org>2013-10-28 15:00:43 +0100
commit170e02deaf2bb1f8f79ffafbb4ff7f62cb933c62 (patch)
tree1f4585e24c7331b6bd7010eb1bf536fae7d812f5 /src/core.h
parent7ae454084ba395c9957c008a66360d3cbfd139a1 (diff)
Generalize the remove-outputs check for fully-prunable transactions.
Instead of explicitly testing for the presence of any output, and dealing with this case specially, just interpret it as an empty CCoins. The case previously caught using the HaveCoins check, is now handled by the generic outs != outsBlock test.
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core.h b/src/core.h
index 9ee8b2edce..70e62716f3 100644
--- a/src/core.h
+++ b/src/core.h
@@ -421,6 +421,9 @@ public:
// equality test
friend bool operator==(const CCoins &a, const CCoins &b) {
+ // Empty CCoins objects are always equal.
+ if (a.IsPruned() && b.IsPruned())
+ return true;
return a.fCoinBase == b.fCoinBase &&
a.nHeight == b.nHeight &&
a.nVersion == b.nVersion &&