File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -1187,32 +1187,6 @@ void CDeterministicMNManager::CleanupCache(int nHeight)
11871187
11881188}
11891189
1190- [[nodiscard]] static bool EraseOldDBData (CDBWrapper& db, const std::vector<std::string>& db_key_prefixes)
1191- {
1192- bool erased{false };
1193- for (const auto & db_key_prefix : db_key_prefixes) {
1194- CDBBatch batch{db};
1195- std::unique_ptr<CDBIterator> it{db.NewIterator ()};
1196- std::pair firstKey{db_key_prefix, uint256 ()};
1197- it->Seek (firstKey);
1198- while (it->Valid ()) {
1199- decltype (firstKey) curKey;
1200- if (!it->GetKey (curKey) || std::get<0 >(curKey) != db_key_prefix) {
1201- break ;
1202- }
1203- batch.Erase (curKey);
1204- erased = true ;
1205- it->Next ();
1206- }
1207- if (erased) {
1208- LogPrintf (" CDeterministicMNManager::%s -- updating db...\n " , __func__);
1209- db.WriteBatch (batch);
1210- LogPrintf (" CDeterministicMNManager::%s -- done cleaning old data for %s\n " , __func__, db_key_prefix);
1211- }
1212- }
1213- return erased;
1214- }
1215-
12161190template <typename ProTx>
12171191static bool CheckService (const ProTx& proTx, TxValidationState& state)
12181192{
You can’t perform that action at this time.
0 commit comments