restored the blob compare

This commit is contained in:
Brannon King 2020-03-03 10:42:42 -07:00
parent b2186806e3
commit 80237390ff
3 changed files with 9 additions and 9 deletions

View file

@ -42,19 +42,19 @@ int CBaseBlob<BITS>::Compare(const CBaseBlob& b) const
template<uint32_t BITS>
bool CBaseBlob<BITS>::operator<(const CBaseBlob& b) const
{
return data < b.data;
return Compare(b) < 0;
}
template<uint32_t BITS>
bool CBaseBlob<BITS>::operator==(const CBaseBlob& b) const
{
return data == b.data;
return Compare(b) == 0;
}
template<uint32_t BITS>
bool CBaseBlob<BITS>::operator!=(const CBaseBlob& b) const
{
return data != b.data;
return Compare(b) != 0;
}
template<uint32_t BITS>

View file

@ -158,15 +158,15 @@ struct BlockMapComparer {
}
};
struct BlockMap : public robin_hood::unordered_flat_set<CBlockIndex*, BlockMapHasher, BlockMapComparer> {
struct BlockMap : public robin_hood::unordered_set<CBlockIndex*, BlockMapHasher, BlockMapComparer> {
inline iterator find(const uint256& blockHash) {
CBlockIndex temp(blockHash);
return robin_hood::unordered_flat_set<CBlockIndex*, BlockMapHasher, BlockMapComparer>::find(&temp);
return robin_hood::unordered_set<CBlockIndex*, BlockMapHasher, BlockMapComparer>::find(&temp);
}
inline const_iterator find(const uint256& blockHash) const {
CBlockIndex temp(blockHash);
return robin_hood::unordered_flat_set<CBlockIndex*, BlockMapHasher, BlockMapComparer>::find(&temp);
return robin_hood::unordered_set<CBlockIndex*, BlockMapHasher, BlockMapComparer>::find(&temp);
}
};

View file

@ -699,7 +699,7 @@ private:
* detect and report conflicts (double-spends or
* mutated transactions where the mutant gets mined).
*/
typedef robin_hood::unordered_flat_map<uint256, robin_hood::unordered_flat_map<uint32_t, std::vector<uint256>>> TxSpends;
typedef robin_hood::unordered_map<uint256, robin_hood::unordered_map<uint32_t, std::vector<uint256>>> TxSpends;
TxSpends mapTxSpends;
void AddToSpends(const COutPoint& outpoint, const uint256& wtxid);
void AddToSpends(const uint256& wtxid);
@ -808,10 +808,10 @@ public:
void MarkPreSplitKeys();
// Map from Key ID to key metadata.
robin_hood::unordered_flat_map<CKeyID, CKeyMetadata> mapKeyMetadata;
robin_hood::unordered_map<CKeyID, CKeyMetadata> mapKeyMetadata;
// Map from Script ID to key metadata (for watch-only keys).
robin_hood::unordered_flat_map<CScriptID, CKeyMetadata> m_script_metadata;
robin_hood::unordered_map<CScriptID, CKeyMetadata> m_script_metadata;
typedef std::map<unsigned int, CMasterKey> MasterKeyMap;
MasterKeyMap mapMasterKeys;