Fix #588 Wallet list index out of range error
Uses the number of mixdepths from the wallet file
Coverage decreased (-0.09%) to 79.945% when pulling 141be19442b1136e8f7cebb2356bebb12f2e629d on AlexCato:fix_wallet_index_error into 984626bfc19fa318ba41e36fb3f4c8dd4ed82c39 on JoinMarket-Org:develop.
I think I found a problem with this solution:
Given there's a standard wallet with 5 mixdepths, but you start a yieldgenerator with a max_mixdepth-configuration of fewer than 5: then there will be wallet.json-file will be changed to contain the fewer index caches. This PR then will make it impossible to ever be able to use the original number of mixdepths again.
Proposed solution: Changing the default value of max_mixdepth in the configuration to -1 (from 5) and only read the number of mixdepths from the wallet file if the user does not specify the max_mixdepth. Will code that later if noone sees a problem with that.
Changed default in wallet-tool.py to -1 now. This will auto-detect the number of mixdepths only if the user does not explicitly configure it.
Therefor the default behavior is improved without any change in behavior if the user intentionally sets the parameter.
Coverage decreased (-0.08%) to 79.958% when pulling b7db6d1b8a1702c76ab849d6606f9923d31f59b2 on AlexCato:fix_wallet_index_error into 984626bfc19fa318ba41e36fb3f4c8dd4ed82c39 on JoinMarket-Org:develop.
utACK on this. Anyone else have any thoughts?
Agreed. No conceivable negative I can see. Merging. Edit: on second thoughts, need to think a bit :)