From bd28372eb720e6474820aee57ce0c1ffa25a8c5f Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Fri, 7 Dec 2018 22:04:36 +0100 Subject: [PATCH] [enh] #145: add check if the certification is already in the pendings --- silkaj/cert.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/silkaj/cert.py b/silkaj/cert.py index 0d03e896..4023f7df 100644 --- a/silkaj/cert.py +++ b/silkaj/cert.py @@ -44,6 +44,11 @@ def send_certification(cli_args): renewable_date = convert_time(time() + renewable, "date") message_exit("Certification renewable the " + renewable_date) + # Check if the certification is already in the pending certifications + for pending_cert in req["pendingCerts"]: + if pending_cert["from"] == issuer_pubkey: + message_exit("Certification is currently been processed") + # Certification confirmation if not certification_confirmation( issuer_id, issuer_pubkey, id_to_certify, main_id_to_certify -- GitLab