When empty tree was being restored from file starting index was 1 instead of 0. It shouldn't be a big deal for production but may be problematic in some test cases. And still it is a bug - so nice to be fixed.
Solution
When tree is being restored instead of using zero as default value None optional is used to indicate that actually there is no latest index as there are no used indexes at all.
Motivation
When empty tree was being restored from file starting index was 1 instead of 0. It shouldn't be a big deal for production but may be problematic in some test cases. And still it is a bug - so nice to be fixed.
Solution
When tree is being restored instead of using zero as default value None optional is used to indicate that actually there is no latest index as there are no used indexes at all.
PR Checklist