1
0

use address as key in contacts

This commit is contained in:
ThomasV
2016-05-28 16:56:18 +02:00
parent 1a8b12360b
commit 2259b741f6
3 changed files with 20 additions and 24 deletions

View File

@@ -35,6 +35,13 @@ class Contacts(StoreDict):
def __init__(self, config):
StoreDict.__init__(self, config, 'contacts')
# backward compatibility
for k, v in self.items():
_type, n = v
if _type == 'address' and bitcoin.is_address(n):
self.pop(k)
self[n] = ('address', k)
def resolve(self, k):
if bitcoin.is_address(k):