Skip to content
Snippets Groups Projects
Commit 00168a79 authored by Moul's avatar Moul Committed by Mael
Browse files

[mod] #184: use `for i in enumerate()`.

parent 652eb059
No related branches found
No related tags found
No related merge requests found
......@@ -153,13 +153,12 @@ async def get_sources(pubkey):
last_block_number = head_block["number"]
# add pending output
for pending in pendings:
for i, pending in enumerate(pendings):
blockstamp = pending["blockstamp"]
block_number = int(blockstamp.split("-")[0])
# if it's not an old transaction (bug in mirror node)
if block_number >= last_block_number - 3:
identifier = pending["hash"]
i = 0
for output in pending["outputs"]:
outputsplited = output.split(":")
if outputsplited[2] == "SIG(" + pubkey + ")":
......@@ -172,7 +171,6 @@ async def get_sources(pubkey):
)
if inputgenerated not in listinput:
listinput.append(inputgenerated)
i += 1
# remove input already used
for pending in pendings:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment