aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 4e88bd4c4..6dd0d8b22 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -197,3 +197,12 @@ CBlock getBlock13b8a()
stream >> block;
return block;
}
+
+//! equality test
+bool operator==(const Coin &a, const Coin &b) {
+ // Empty Coin objects are always equal.
+ if (a.IsSpent() && b.IsSpent()) return true;
+ return a.fCoinBase == b.fCoinBase &&
+ a.nHeight == b.nHeight &&
+ a.out == b.out;
+}