mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
committed by
Pieter Wuille
parent
7ae454084b
commit
170e02deaf
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user