subtensor
subtensor copied to clipboard
Set Children: No check for empty vector
When children are set in do_set_pending_children, the ChildKeys::<T>::insert happens unconditionally, even if the children vector is empty. As a result, we have many dangling empty records in ChildKeys map.
- Fix the issue
- Write a migration that removes ChildKey entries that contain empty vectors
We do need to support setting it to empty. Just make sure to ::remove I guess