Skip to content
Snippets Groups Projects
Commit 70636fa1 authored by inso's avatar inso
Browse files

Merge branch 'dev'

parents 25af9e93 20d569ff
Branches
Tags
No related merge requests found
......@@ -10,4 +10,4 @@ class Certification:
block = attr.ib(convert=int)
timestamp = attr.ib(convert=int, cmp=False)
signature = attr.ib(convert=str, cmp=False, hash=False)
written_on = attr.ib(convert=int, default=0, cmp=False, hash=False)
written_on = attr.ib(convert=int, default=-1, cmp=False, hash=False)
......@@ -80,7 +80,10 @@ class BaseGraph(QObject):
:rtype: str
"""
try:
if block_number >= 0:
current_confirmations = min(max(self.blockchain_service.current_buid().number - block_number, 0), 6)
else:
current_confirmations = 0
if MAX_CONFIRMATIONS > current_confirmations:
if self.app.parameters.expert_mode:
......@@ -130,7 +133,7 @@ class BaseGraph(QObject):
QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
),
'cert_time': certification.timestamp,
'confirmation_text': self.confirmation_text(certification.block)
'confirmation_text': self.confirmation_text(certification.written_on)
}
self.nx_graph.add_edge(certifier.pubkey, identity.pubkey, attr_dict=arc)
......@@ -153,7 +156,7 @@ class BaseGraph(QObject):
QLocale.dateFormat(QLocale(), QLocale.ShortFormat)
),
'cert_time': certification.timestamp,
'confirmation_text': self.confirmation_text(certification.block)
'confirmation_text': self.confirmation_text(certification.written_on)
}
self.nx_graph.add_edge(identity.pubkey, certified.pubkey, attr_dict=arc)
......
......@@ -4,3 +4,5 @@ fakenet:
gtest:
C4orqutdb3Nveur3xN5L2TduT1j8d2EZkJsWLmWuD2Sv:
- "BASIC_MERKLED_API gtest.duniter.org 10900"
- "BASIC_MERKLED_API cgeek.fr 10900"
- "BASIC_MERKLED_API gtest.duniter.fr 10900"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment