Currently the coverage for the keeper package in the stake module is ~71.6%. Things I noticed that I think could be improved:
UpdateBondedValidatorsFull, GetAllValidators, GetValidators)GetValidatorsByPower is not indicative that it returns bonded validators).I'd be happy to do all of the above.
/cc @cwgoes @rigelrozanski
All of those sound like great ideas. I think it's also worth seeing if we can reorganize or split up several of the complex validator update functions to clarify preconditions and postconditions for various intermediary states - that should be done before unit tests.
Yes x100 @cwgoes 👍
Another thing we should test out a bunch of comparisons for the power key https://github.com/cosmos/cosmos-sdk/blob/8053d7fdf509cb859a00be0166c502a182dc4a80/x/stake/keeper/key.go#L70
I think this has either been done or superseded by more recent issues, although more unit tests are always good!
Most helpful comment
All of those sound like great ideas. I think it's also worth seeing if we can reorganize or split up several of the complex validator update functions to clarify preconditions and postconditions for various intermediary states - that should be done before unit tests.