nLeafs is stored with a static key in the db, so only the nLeafs of the last version is available. When building a tree from an old root, the value of GetNLeafs() will be invalid.
nLeafs can be stored in the db with a dynamic key that contains the root to allow querying nLeafs at old roots.
nLeafs is stored with a static key in the db, so only the nLeafs of the last version is available. When building a tree from an old root, the value of
GetNLeafs()will be invalid.nLeafs can be stored in the db with a dynamic key that contains the root to allow querying nLeafs at old roots.