bitcoinknots / bitcoin

Bitcoin Knots enhanced Bitcoin node/wallet software
MIT License
199 stars 60 forks source link

Disallow most address reuse appears unselected after restarting client - GUI #48

Closed Tracachang closed 1 year ago

Tracachang commented 2 years ago

Using bitcoin-qt I do select the option disallow most address reuse (settings -> options -> mempool), clients need to restart to activate the change but after restart the option appears unselected. Tried many times with same result.

It seems to be just a GUI error, since when I do select the option, bitcoin_rw.conf file adds: spkreuse=conflict and in the debuglog I can also see:

Setting file arg: spkreuse = "conflict"

But since in GUI it is always showing unselected, the only way to deactivate this option is by manually deleting spkreuse=conflict in bitcoin_rw.conf file

I am using Bitcoin Knots version v22.0.knots20211108 with Manjaro 21.2.5

luke-jr commented 1 year ago

Can be fixed by editing src/qt/optionsmodel.cpp:

-    f_rejectspkreuse = (SpkReuseMode != SRM_ALLOW);
+    f_rejectspkreuse = !(gArgs.GetArg("-spkreuse", DEFAULT_SPKREUSE) == "allow" || gArgs.GetBoolArg("-spkreuse", false));
luke-jr commented 1 year ago

Should be fixed in Knots 23.0.knots20220529 - can you confirm?

Tracachang commented 1 year ago

Yes, I do confirm, it is fixed.

Thank you