Handle invalid node cert during node validation

pull/1881/head
Kieran Prasch 2020-09-21 15:31:41 -07:00 committed by David Núñez
parent adf1c84c4f
commit c0313e8311
1 changed files with 4 additions and 1 deletions

View File

@ -397,7 +397,10 @@ class Learner:
stranger_certificate = node.certificate
# Store node's certificate - It has been seen.
certificate_filepath = self.node_storage.store_node_certificate(certificate=stranger_certificate)
try:
certificate_filepath = self.node_storage.store_node_certificate(certificate=stranger_certificate)
except InvalidNodeCertificate:
return False # that was easy
# In some cases (seed nodes or other temp stored certs),
# this will update the filepath from the temp location to this one.