subtensor icon indicating copy to clipboard operation
subtensor copied to clipboard

Set Children: No check for empty vector

Open gztensor opened this issue 3 months ago • 1 comments

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.

  1. Fix the issue
  2. Write a migration that removes ChildKey entries that contain empty vectors

gztensor avatar Oct 06 '25 19:10 gztensor

We do need to support setting it to empty. Just make sure to ::remove I guess

camfairchild avatar Oct 06 '25 20:10 camfairchild