Skip to content

Commit e2f053a

Browse files
committed
merge bitcoin#25438: remove unused methods in classes CDBIterator,CDBWrapper,CCoinsViewDBCursor
1 parent 79fcd30 commit e2f053a

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

src/coins.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ class CCoinsViewCursor
158158

159159
virtual bool GetKey(COutPoint &key) const = 0;
160160
virtual bool GetValue(Coin &coin) const = 0;
161-
virtual unsigned int GetValueSize() const = 0;
162161

163162
virtual bool Valid() const = 0;
164163
virtual void Next() = 0;

src/dbwrapper.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,6 @@ class CDBIterator
189189
}
190190
return true;
191191
}
192-
193-
unsigned int GetValueSize() {
194-
return piter->value().size();
195-
}
196-
197192
};
198193

199194
class CDBWrapper
@@ -373,27 +368,10 @@ class CDBWrapper
373368
return size;
374369
}
375370

376-
/**
377-
* Compact a certain range of keys in the database.
378-
*/
379-
template<typename K>
380-
void CompactRange(const K& key_begin, const K& key_end) const
381-
{
382-
CDataStream ssKey1(SER_DISK, CLIENT_VERSION), ssKey2(SER_DISK, CLIENT_VERSION);
383-
ssKey1.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
384-
ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
385-
ssKey1 << key_begin;
386-
ssKey2 << key_end;
387-
leveldb::Slice slKey1(CharCast(ssKey1.data()), ssKey1.size());
388-
leveldb::Slice slKey2(CharCast(ssKey2.data()), ssKey2.size());
389-
pdb->CompactRange(&slKey1, &slKey2);
390-
}
391-
392371
void CompactFull() const
393372
{
394373
pdb->CompactRange(nullptr, nullptr);
395374
}
396-
397375
};
398376

399377
template<typename CDBTransaction>

src/txdb.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ class CCoinsViewDBCursor: public CCoinsViewCursor
214214

215215
bool GetKey(COutPoint &key) const override;
216216
bool GetValue(Coin &coin) const override;
217-
unsigned int GetValueSize() const override;
218217

219218
bool Valid() const override;
220219
void Next() override;
@@ -260,11 +259,6 @@ bool CCoinsViewDBCursor::GetValue(Coin &coin) const
260259
return pcursor->GetValue(coin);
261260
}
262261

263-
unsigned int CCoinsViewDBCursor::GetValueSize() const
264-
{
265-
return pcursor->GetValueSize();
266-
}
267-
268262
bool CCoinsViewDBCursor::Valid() const
269263
{
270264
return keyTmp.first == DB_COIN;

0 commit comments

Comments
 (0)