aboutsummaryrefslogtreecommitdiff
path: root/src/chain.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-08-27 12:46:22 -0400
committerCarl Dong <contact@carldong.me>2020-08-27 20:07:27 -0400
commitdf536883d263781c2abe944afc85f681cda635ed (patch)
treebc3eacca3b1fab6e8b5b34d4faf9de824e12bba5 /src/chain.h
parent93ab136a33e46080c8aa02d59fb7c2a8d03a3387 (diff)
downloadbitcoin-df536883d263781c2abe944afc85f681cda635ed.tar.xz
chain: Remove UB CChain comparison
It was unused, and had UB
Diffstat (limited to 'src/chain.h')
-rw-r--r--src/chain.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/chain.h b/src/chain.h
index 802e23f775..43e8a39f36 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -398,12 +398,6 @@ public:
return vChain[nHeight];
}
- /** Compare two chains efficiently. */
- friend bool operator==(const CChain &a, const CChain &b) {
- return a.vChain.size() == b.vChain.size() &&
- a.vChain[a.vChain.size() - 1] == b.vChain[b.vChain.size() - 1];
- }
-
/** Efficiently check whether a block is present in this chain. */
bool Contains(const CBlockIndex *pindex) const {
return (*this)[pindex->nHeight] == pindex;