1
0

separate storage and database (JsonDB)

This commit is contained in:
ThomasV
2019-02-19 11:56:46 +01:00
parent d5790ea109
commit 7f2083f667
6 changed files with 559 additions and 465 deletions

View File

@@ -1114,3 +1114,14 @@ class OrderedDictWithIndex(OrderedDict):
self._key_to_pos[key] = pos
self._pos_to_key[pos] = key
return ret
def multisig_type(wallet_type):
'''If wallet_type is mofn multi-sig, return [m, n],
otherwise return None.'''
if not wallet_type:
return None
match = re.match(r'(\d+)of(\d+)', wallet_type)
if match:
match = [int(x) for x in match.group(1, 2)]
return match