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?

3

After doing some experiments it appears that as calling the function results in an error, it is not processed, and thus the unlock time is not extended.

  • 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: github.com/bitcoin/bitcoin/issues/1528 because it has been annoying me for some time. – Chris Moore Jun 28 '12 at 2:35
  • 1
    @ChrisMoore I also posted the issue earlier - github.com/bitcoin/bitcoin/issues/1527 . – ThePiachu Jun 28 '12 at 12:11
  • Ugly 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 Jun 29 '12 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.