4
The Bitcoin API call for walletpassphrase allows one to open the wallet for a set amount of time. If one calls it again while the wallet is still unlocked, we get an error of 'Error: Wallet is already unlocked.'. Does the call extend the amount of time the wallet is unlocked, or not?
2
Right. And that's quite annoying functionality. If I want to make a payment, I run the unlock command, then make the payment. If it happens that the wallet was already unlocked, but was due to lock again 1 second later, the unlock call fails, and then the wallet has locked itself before I can make the payment. I just reported a github issue about this: https://github.com/bitcoin/bitcoin/issues/1528 because it has been annoying me for some time.
– Chris Moore – 2012-06-28T02:35:06.2771
@ChrisMoore I also posted the issue earlier - https://github.com/bitcoin/bitcoin/issues/1527 .
– ThePiachu – 2012-06-28T12:11:45.247Ugly workarounds: call walletlock before walletpassphrase.
Or call getinfo to see if the wallet is unlocked (and get the time of when it will be locked again) – gavinandresen – 2012-06-29T18:25:54.970