1
0

optimize channel_db:

- use python objects mirrored by sql database
 - write sql to file asynchronously
 - the sql decorator is awaited in sweepstore, not in channel_db
This commit is contained in:
ThomasV
2019-06-18 13:49:31 +02:00
parent 180f6d34be
commit f2d58d0e3f
11 changed files with 435 additions and 454 deletions

View File

@@ -258,14 +258,21 @@ class LnAddr(object):
def get_min_final_cltv_expiry(self) -> int:
return self._min_final_cltv_expiry
def get_description(self):
def get_tag(self, tag):
description = ''
for k,v in self.tags:
if k == 'd':
if k == tag:
description = v
break
return description
def get_description(self):
return self.get_tag('d')
def get_expiry(self):
return int(self.get_tag('x') or '3600')
def lndecode(a, verbose=False, expected_hrp=None):
if expected_hrp is None: