forked from LBRYCommunity/lbry-sdk
fix flush id
This commit is contained in:
parent
35232b3650
commit
5541b80179
1 changed files with 2 additions and 2 deletions
|
@ -540,7 +540,7 @@ class LevelDB:
|
|||
keys = []
|
||||
for key, hist in self.db.iterator(prefix=DB_PREFIXES.HASHX_HISTORY_PREFIX.value):
|
||||
k = key[1:]
|
||||
flush_id, = unpack_be_uint16_from(k[-2:])
|
||||
flush_id = int.from_bytes(k[-4:], byteorder='big')
|
||||
if flush_id > self.utxo_flush_count:
|
||||
keys.append(k)
|
||||
|
||||
|
@ -719,7 +719,7 @@ class LevelDB:
|
|||
|
||||
# Then history
|
||||
self.hist_flush_count += 1
|
||||
flush_id = pack_be_uint16(self.hist_flush_count)
|
||||
flush_id = util.pack_be_uint32(self.hist_flush_count)
|
||||
unflushed = self.hist_unflushed
|
||||
|
||||
for hashX in sorted(unflushed):
|
||||
|
|
Loading…
Reference in a new issue