libplanet icon indicating copy to clipboard operation
libplanet copied to clipboard

Fix `RocksDBStore.IterateIndexes()`

Open greymistcube opened this issue 1 year ago • 0 comments

The internal logic of IterateIndexes() is bugged, which is why #3999 uses a different implementation to bypass the bugged behavior of IterateIndexes(). In particular, chainInfo.Item2 should be the number of Blocks associated with a chain id, not the Tip.Index (which differs by 1). I am not sure as to how this hasn't been causing more serious problems (at least seemingly) so far, but upon inspection, it's been confirmed that the internal database already has been corrupted. After #3999, it should become rather trivial to fix this issue.

greymistcube avatar Nov 28 '24 04:11 greymistcube