Update CBlockTreeDB::EraseBatchSync for dbwrapper refactor
This commit is contained in:
parent
56aa25684c
commit
2d7bae5b33
|
@ -217,7 +217,7 @@ bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockF
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBlockTreeDB::EraseBatchSync(const std::vector<const CBlockIndex*>& blockinfo) {
|
bool CBlockTreeDB::EraseBatchSync(const std::vector<const CBlockIndex*>& blockinfo) {
|
||||||
CLevelDBBatch batch;
|
CDBBatch batch(*this);
|
||||||
for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) {
|
for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) {
|
||||||
batch.Erase(make_pair(DB_BLOCK_INDEX, (*it)->GetBlockHash()));
|
batch.Erase(make_pair(DB_BLOCK_INDEX, (*it)->GetBlockHash()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue