subtensor
subtensor copied to clipboard
add cleared amount in remove_stake
Description
Currently, only the user requested amount is emitted in the event StakeRemoved.
In the new runtime upgrade, when the staked amount is less than the minimum amount(set to 0.1TAO at the moment), it gets cleared automatically.
In this PR, I take the cleared amount into consideration in remove_stake extrinsic.
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Other (please describe):
Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have run
cargo fmtandcargo clippyto ensure my code is formatted and linted correctly - [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Please rebase this on devnet_ready