Merge f697c068eb into merged_master (Bitcoin PR bitcoin/bitcoin#25438)

This commit is contained in:
James Dorfman 2024-09-16 05:06:36 +00:00
commit 1a34bdf273
3 changed files with 0 additions and 28 deletions

View file

@ -150,7 +150,6 @@ public:
virtual bool GetKey(COutPoint &key) const = 0;
virtual bool GetValue(Coin &coin) const = 0;
virtual unsigned int GetValueSize() const = 0;
virtual bool Valid() const = 0;
virtual void Next() = 0;

View file

@ -166,11 +166,6 @@ public:
}
return true;
}
unsigned int GetValueSize() {
return piter->value().size();
}
};
class CDBWrapper
@ -318,22 +313,6 @@ public:
pdb->GetApproximateSizes(&range, 1, &size);
return size;
}
/**
* Compact a certain range of keys in the database.
*/
template<typename K>
void CompactRange(const K& key_begin, const K& key_end) const
{
CDataStream ssKey1(SER_DISK, CLIENT_VERSION), ssKey2(SER_DISK, CLIENT_VERSION);
ssKey1.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey1 << key_begin;
ssKey2 << key_end;
leveldb::Slice slKey1((const char*)ssKey1.data(), ssKey1.size());
leveldb::Slice slKey2((const char*)ssKey2.data(), ssKey2.size());
pdb->CompactRange(&slKey1, &slKey2);
}
};
#endif // BITCOIN_DBWRAPPER_H

View file

@ -237,7 +237,6 @@ public:
bool GetKey(COutPoint &key) const override;
bool GetValue(Coin &coin) const override;
unsigned int GetValueSize() const override;
bool Valid() const override;
void Next() override;
@ -283,11 +282,6 @@ bool CCoinsViewDBCursor::GetValue(Coin &coin) const
return pcursor->GetValue(coin);
}
unsigned int CCoinsViewDBCursor::GetValueSize() const
{
return pcursor->GetValueSize();
}
bool CCoinsViewDBCursor::Valid() const
{
return keyTmp.first == DB_COIN;