Skip to content

Commit 5a514c3

Browse files
committed
Merge pull request #4354
7ad720d Added encryptwallet call to bitrpc.py (dllud)
2 parents 5694d10 + 7ad720d commit 5a514c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

contrib/bitrpc/bitrpc.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@
2222
print access.backupwallet(path)
2323
except:
2424
print "\n---An error occurred---\n"
25+
26+
elif cmd == "encryptwallet":
27+
try:
28+
pwd = getpass.getpass(prompt="Enter passphrase: ")
29+
pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
30+
if pwd == pwd2:
31+
access.encryptwallet(pwd)
32+
print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
33+
else:
34+
print "\n---Passphrases do not match---\n"
35+
except:
36+
print "\n---An error occurred---\n"
2537

2638
elif cmd == "getaccount":
2739
try:

0 commit comments

Comments
 (0)