Skip to content

Possible fix to avoid infinite loop (in rare cases) after PR 186#202

Merged
ca333 merged 3 commits intoKomodoPlatform:devfrom
phm87:patch-12
Oct 7, 2020
Merged

Possible fix to avoid infinite loop (in rare cases) after PR 186#202
ca333 merged 3 commits intoKomodoPlatform:devfrom
phm87:patch-12

Conversation

@phm87
Copy link
Copy Markdown
Contributor

@phm87 phm87 commented Sep 17, 2020

j was incremented at the beginning of the loop and in PR 186, I moved it to the end of the loop to be sure to take into account j = 0 but I forgot to take into account two cases with continue;
https://github.com/KomodoPlatform/dPoW/pull/186/files

I think that this new change fixes this problem. To be tested, discussed, analysed, code reviewed and merged.

@phm87
Copy link
Copy Markdown
Contributor Author

phm87 commented Sep 17, 2020

@ca333 I should have target dev branch and not master, sorry.
I targeted correctly dev branch for my previous PR though...

@phm87 phm87 changed the title Possible fix to avoid infinite loop after PR 186 Possible fix to avoid infinite loop (in rare cases) after PR 186 Sep 17, 2020
Copy link
Copy Markdown
Contributor

@DeckerSU DeckerSU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Definitely earlier we forget about these two cases with continue, as a result in some cases with "no available utxos" we had infinite loop.

@ca333 ca333 merged commit f7efd73 into KomodoPlatform:dev Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants