Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] execute method require statement: is it needed? #8

Open
cbruguera opened this issue Apr 30, 2018 · 0 comments
Open

[Question] execute method require statement: is it needed? #8

cbruguera opened this issue Apr 30, 2018 · 0 comments

Comments

@cbruguera
Copy link

At the beginning of the execute method, there's the following require statement:

require(!executions[executionNonce].executed, "Already executed");

However, I'm still trying to wrap my head around this line. Is it actually possible that the execution task with the current global nonce is already executed? My impression is that executionNonce always points to the next execution id yet to be added. How can it have already been executed if there's still no execution requested with such id yet (otherwise executionNonce would have been incremented already)?

Am I missing something? Is this some sort of concurrency check? (if that makes any sense in solidity)

Can you please clarify? Thanks in advance.

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

No branches or pull requests

1 participant