AntelopeIO / leap

C++ implementation of the Antelope protocol
Other
116 stars 70 forks source link

Make snapshot file names more user friendly #1043

Open vladtr opened 1 year ago

vladtr commented 1 year ago

Currently snapshot file names look like this: snapshot-000001a83cab9d06f55de7bba575e29594b3cca04c33267adb63cfb691db6575.bin

It would be pretty convenient to include zero-padded block height in decimal format prior to block ID. This allows a set of snapshot files to be lexicographically sorted but still be human understandable at a glance

matthewdarwin commented 1 year ago

If I recall, first few bytes of the filename encode the block number.

heifner commented 1 year ago

If I recall, first few bytes of the filename encode the block number.

It is yes. I think the idea is to make it more human readable.

matthewdarwin commented 1 year ago

Yes, for sure. Just wanted to mention that in case someone wanted to be able to do something with the existing filenames. ;-)