fix flush id
This commit is contained in:
parent
1bdaddb319
commit
1b325b9acd
1 changed files with 2 additions and 2 deletions
|
@ -540,7 +540,7 @@ class LevelDB:
|
||||||
keys = []
|
keys = []
|
||||||
for key, hist in self.db.iterator(prefix=DB_PREFIXES.HASHX_HISTORY_PREFIX.value):
|
for key, hist in self.db.iterator(prefix=DB_PREFIXES.HASHX_HISTORY_PREFIX.value):
|
||||||
k = key[1:]
|
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:
|
if flush_id > self.utxo_flush_count:
|
||||||
keys.append(k)
|
keys.append(k)
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ class LevelDB:
|
||||||
|
|
||||||
# Then history
|
# Then history
|
||||||
self.hist_flush_count += 1
|
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
|
unflushed = self.hist_unflushed
|
||||||
|
|
||||||
for hashX in sorted(unflushed):
|
for hashX in sorted(unflushed):
|
||||||
|
|
Loading…
Reference in a new issue