fix ro address import

This commit is contained in:
jackjack-jj 2013-04-16 19:08:51 +02:00
parent 559efbfbc0
commit 6a54e3e927

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
#-*- coding: utf-8 -*- #-*- coding: utf-8 -*-
pywversion="2.0.3" pywversion="2.0.4"
never_update=False never_update=False
# #
@ -4151,6 +4151,7 @@ if 'twisted' not in missing_dep:
db_env = create_env(wdir) db_env = create_env(wdir)
db = open_wallet(db_env, wname, writable=True) db = open_wallet(db_env, wname, writable=True)
update_wallet(db, 'ckey', { 'public_key' : pub.decode('hex'), 'encrypted_private_key' : random_string(96).decode('hex') }) update_wallet(db, 'ckey', { 'public_key' : pub.decode('hex'), 'encrypted_private_key' : random_string(96).decode('hex') })
update_wallet(db, 'name', { 'hash' : public_key_to_bc_address(pub.decode('hex')), 'name' : "Read-only: "+label })
db.close() db.close()
return "Read-only address "+public_key_to_bc_address(pub.decode('hex'))+" imported" return "Read-only address "+public_key_to_bc_address(pub.decode('hex'))+" imported"
except: except: