Is there any API available to check whether an account is locked/unlocked in geth ? If i try to unlock an account that is already in unlocked state, does geth look out for the cached decrypted key , instead of decrypting each time ?

Also what if there are concurrent requests for unlocking of the same account (which is initially locked) ? Can this result in out of Memory error ?

  • did you find the answer? – tatigo Nov 8 '17 at 21:04

At the geth console (invoked by geth attach), run personal.listWallets to see a list of wallets and their statuses:

    accounts: [{
        address: "0xae9c2ed2209d2228c131cc99569233a5d506770b",
        url: "..."
    status: "Unlocked",
    url: "..."

You're interested in the wallet status field which can be either "Locked" or "Unlocked".

| improve this answer | |
  • web3.personal does not provide listWallets under nodejs @aupiff – alper Mar 13 '18 at 22:20
  • 1
    I was talking about the geth console in my response. geth console commands are not identical to those defined in the web3.js library. – aupiff Apr 2 '18 at 20:24

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.