diff --git a/silkaj/blocks.py b/silkaj/blocks.py index 6aa1c76188a6c64643c1307b8eedbc5dab8bd102..81197941a69da4c48e6b00f37e1d37c27828daf9 100644 --- a/silkaj/blocks.py +++ b/silkaj/blocks.py @@ -44,14 +44,12 @@ def verify_blocks_signatures(from_block, to_block): for chunk_from in bar: chunk_size = get_chunk_size(from_block, to_block, chunks_from, chunk_from) logging.info( - "Processing chunk from block {} to {}".format( - chunk_from, chunk_from + chunk_size - ) + f"Processing chunk from block {chunk_from} to {chunk_from + chunk_size}" ) chunk = get_chunk(client, chunk_size, chunk_from) for block in chunk: - block = Block.from_signed_raw(block["raw"] + block["signature"] + "\n") + block = Block.from_signed_raw(f'{block["raw"]}{block["signature"]}\n') verify_block_signature(invalid_blocks_signatures, block) display_result(from_block, to_block, invalid_blocks_signatures) @@ -63,8 +61,7 @@ def check_passed_blocks_range(client, from_block, to_block): to_block = head_number if to_block > head_number: message_exit( - "Passed TO_BLOCK argument is bigger than the head block: " - + str(head_number) + f"Passed TO_BLOCK argument is bigger than the head block: {str(head_number)}" ) if from_block > to_block: message_exit("TO_BLOCK should be bigger or equal to FROM_BLOCK") diff --git a/silkaj/cert.py b/silkaj/cert.py index de07e2ec8ade79f89c0c242f0a2db610ea32b755..4f4a010d4d5906c98c35530c9c01fdd3e5870237 100644 --- a/silkaj/cert.py +++ b/silkaj/cert.py @@ -99,7 +99,7 @@ def pre_checks(client, issuer_pubkey, pubkey_to_certify): renewable = cert["expiresIn"] - params["sigValidity"] + params["sigReplay"] if renewable > 0: renewable_date = now().add(seconds=renewable).format(DATE) - sys.exit("Certification renewable from " + renewable_date) + sys.exit(f"Certification renewable from {renewable_date}") # Check if the certification is already in the pending certifications for pending_cert in req["pendingCerts"]: