joinmarket icon indicating copy to clipboard operation
joinmarket copied to clipboard

Fix #588 Wallet list index out of range error

Open AlexCato opened this issue 9 years ago • 6 comments

Uses the number of mixdepths from the wallet file

AlexCato avatar Jul 04 '16 00:07 AlexCato

Coverage Status

Coverage decreased (-0.09%) to 79.945% when pulling 141be19442b1136e8f7cebb2356bebb12f2e629d on AlexCato:fix_wallet_index_error into 984626bfc19fa318ba41e36fb3f4c8dd4ed82c39 on JoinMarket-Org:develop.

coveralls avatar Jul 04 '16 00:07 coveralls

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.

AlexCato avatar Jul 04 '16 08:07 AlexCato

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.

AlexCato avatar Jul 04 '16 11:07 AlexCato

Coverage Status

Coverage decreased (-0.08%) to 79.958% when pulling b7db6d1b8a1702c76ab849d6606f9923d31f59b2 on AlexCato:fix_wallet_index_error into 984626bfc19fa318ba41e36fb3f4c8dd4ed82c39 on JoinMarket-Org:develop.

coveralls avatar Jul 04 '16 11:07 coveralls

utACK on this. Anyone else have any thoughts?

chris-belcher avatar Jan 03 '17 17:01 chris-belcher

Agreed. No conceivable negative I can see. Merging. Edit: on second thoughts, need to think a bit :)

AdamISZ avatar Jan 04 '17 13:01 AdamISZ