Skip to content
Snippets Groups Projects
Commit e66c53df authored by Vincent Texier's avatar Vincent Texier
Browse files

[fix] fix missing node software and software_version in network view

parent 8d53b5c2
No related branches found
No related tags found
1 merge request!7750.50.0
import attr
import sqlite3
from duniterpy.documents.ws2p.heads import HeadV1, HeadV2
from sakia.constants import ROOT_SERVERS
from ..entities import Node
from duniterpy.documents import BlockUID
......@@ -154,6 +157,15 @@ class NodesProcessor:
logging.debug("Update node : {0}".format(head.pubkey[:5]))
node.previous_buid = node.current_buid
node.current_buid = head.blockstamp
# todo: https://git.duniter.org/clients/python/duniterpy/issues/120
# capture sofware and version
if isinstance(head, HeadV2):
node.software = head.v1.software
node.version = head.v1.software_version
else:
node.software = head.software
node.version = head.software_version
self._repo.update(node)
return node, True
return node, False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment