git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ace127e
)
define check_password for imported wallets
author
ThomasV
<thomasv@gitorious>
Thu, 1 May 2014 11:08:12 +0000 (13:08 +0200)
committer
ThomasV
<thomasv@gitorious>
Thu, 1 May 2014 11:08:12 +0000 (13:08 +0200)
lib/wallet.py
patch
|
blob
|
history
diff --git
a/lib/wallet.py
b/lib/wallet.py
index
05572d3
..
ea3c6c9
100644
(file)
--- a/
lib/wallet.py
+++ b/
lib/wallet.py
@@
-256,7
+256,7
@@
class Abstract_Wallet:
return False
def check_password(self, password):
- pass
+ raise
def set_up_to_date(self,b):
@@
-1125,6
+1125,12
@@
class Imported_Wallet(Abstract_Wallet):
def is_deterministic(self):
return False
+ def check_password(self, password):
+ if self.imported_keys:
+ k, v = self.imported_keys.items()[0]
+ sec = pw_decode(v, password)
+ address = address_from_private_key(sec)
+ assert address == k
class Deterministic_Wallet(Abstract_Wallet):