mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
chain: Remove UB CChain comparison
It was unused, and had UB
This commit is contained in:
parent
93ab136a33
commit
df536883d2
1 changed files with 0 additions and 6 deletions
|
@ -398,12 +398,6 @@ public:
|
||||||
return vChain[nHeight];
|
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. */
|
/** Efficiently check whether a block is present in this chain. */
|
||||||
bool Contains(const CBlockIndex *pindex) const {
|
bool Contains(const CBlockIndex *pindex) const {
|
||||||
return (*this)[pindex->nHeight] == pindex;
|
return (*this)[pindex->nHeight] == pindex;
|
||||||
|
|
Loading…
Add table
Reference in a new issue