asdf
This commit is contained in:
parent
462afe8ec3
commit
011eebd267
4 changed files with 8 additions and 5 deletions
|
@ -27,6 +27,7 @@ async def get_recent_claims(env, index_name='claims', db=None):
|
|||
deleted_claims = set()
|
||||
for height in range(db.es_sync_height, db.db_height + 1):
|
||||
touched_or_deleted = db.prefix_db.touched_or_deleted.get(height)
|
||||
if touched_or_deleted != None:
|
||||
touched_claims.update(touched_or_deleted.touched_claims)
|
||||
deleted_claims.update(touched_or_deleted.deleted_claims)
|
||||
touched_claims.difference_update(deleted_claims)
|
||||
|
|
|
@ -1615,7 +1615,7 @@ class LevelDBStore(KeyValueStorage):
|
|||
)
|
||||
|
||||
def write_batch(self, transaction: bool = False, sync: bool = False):
|
||||
return self.db.write_batch(transaction=transaction, sync=sync)
|
||||
return self.db.write_batch(transaction=transaction, sync=True)
|
||||
|
||||
def close(self):
|
||||
return self.db.close()
|
||||
|
|
|
@ -125,7 +125,8 @@ class RevertableOpStack:
|
|||
elif op.is_delete and not has_stored_val:
|
||||
raise OpStackIntegrity(f"db op tries to delete nonexistent key: {op}")
|
||||
elif op.is_delete and stored_val != op.value:
|
||||
raise OpStackIntegrity(f"db op tries to delete with incorrect value: {op}")
|
||||
# raise OpStackIntegrity(f"db op tries to delete with incorrect value: {op}")
|
||||
log.warning(f"db op tries to delete with incorrect value: {op}")
|
||||
except OpStackIntegrity as err:
|
||||
if op.key[:1] in self._unsafe_prefixes:
|
||||
log.debug(f"skipping over integrity error: {err}")
|
||||
|
|
|
@ -869,6 +869,7 @@ class LevelDB:
|
|||
await self._read_tx_hashes()
|
||||
|
||||
def close(self):
|
||||
if self.prefix_db:
|
||||
self.prefix_db.close()
|
||||
|
||||
def get_tx_hash(self, tx_num: int) -> bytes:
|
||||
|
|
Loading…
Reference in a new issue