Open athanclark opened 7 years ago
Hah. Interesting - it's because there's a comparison for !m_restore_height
on line 1317
of simplewallet.cpp
, meaning that any value other than 0
will result in the expected behaviour...
I guess we could add a test for zero but how often are people going to ask for restore height to be zero? Also...it's a little tricky because the restore height is an unsigned int meaning it's not possible to just pre-initialise it at -1 and wait for user input
@moneromooo-monero or @fluffypony do you know what the checks from line 1609-1616 in simplewallet.cpp
are meant to accomplish?
It seems to read: If we're creating a new wallet, set refresh from block height 0 (done in a very convoluted way) But if we have a restore height, refresh from the height supplied
I don't like if
/if-else
statements where the two variables are independent and not all combinations are caught, and the entire purpose of the function is to create a new wallet, already abrogating the need for the first if
Also, see #759
+bug
If you try something like the following:
monero-wallet-cli
will still ask for input regarding what block height should be for restoration.