restored the blob compare
This commit is contained in:
parent
b2186806e3
commit
80237390ff
3 changed files with 9 additions and 9 deletions
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue