Skip to content

Commit df53688

Browse files
committed
chain: Remove UB CChain comparison
It was unused, and had UB
1 parent 93ab136 commit df53688

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/chain.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,6 @@ class CChain {
398398
return vChain[nHeight];
399399
}
400400

401-
/** Compare two chains efficiently. */
402-
friend bool operator==(const CChain &a, const CChain &b) {
403-
return a.vChain.size() == b.vChain.size() &&
404-
a.vChain[a.vChain.size() - 1] == b.vChain[b.vChain.size() - 1];
405-
}
406-
407401
/** Efficiently check whether a block is present in this chain. */
408402
bool Contains(const CBlockIndex *pindex) const {
409403
return (*this)[pindex->nHeight] == pindex;

0 commit comments

Comments
 (0)