From df536883d263781c2abe944afc85f681cda635ed Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 27 Aug 2020 12:46:22 -0400 Subject: [PATCH] chain: Remove UB CChain comparison It was unused, and had UB --- src/chain.h | 6 ------ 1 file changed, 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;