Browse Source

Merge pull request #4354

7ad720d Added encryptwallet call to bitrpc.py (dllud)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
5a514c35bc
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 12
      contrib/bitrpc/bitrpc.py

12
contrib/bitrpc/bitrpc.py

@ -23,6 +23,18 @@ if cmd == "backupwallet": @@ -23,6 +23,18 @@ if cmd == "backupwallet":
except:
print "\n---An error occurred---\n"
elif cmd == "encryptwallet":
try:
pwd = getpass.getpass(prompt="Enter passphrase: ")
pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
if pwd == pwd2:
access.encryptwallet(pwd)
print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
else:
print "\n---Passphrases do not match---\n"
except:
print "\n---An error occurred---\n"
elif cmd == "getaccount":
try:
addr = raw_input("Enter a Bitcoin address: ")

Loading…
Cancel
Save