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

CS6.7 - Remove unreachable code #227

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CallbacksTest:testNestedCallbackResetsCallbackSlot() (gas: 87858)
CallbacksTest:testPayableCallback() (gas: 76928)
CallbacksTest:testReentrancyGuardProtectsAgainstDoubleDipping() (gas: 54343)
CallbacksTest:testRevertsOnCallbackWhenNoActiveCallback() (gas: 72601)
CallbacksTest:testSimpleCallback() (gas: 284574)
CallbacksTest:testSimpleCallback() (gas: 284460)
CallbacksTest:testWithClearedCallback() (gas: 156369)
CallbacksTest:testWithoutAllowCallback() (gas: 156138)
CodeJarTest:testCodeJarCanBeWacky() (gas: 114646)
Expand Down Expand Up @@ -69,14 +69,14 @@ MulticallTest:testSupplyWETHWithdrawUSDCOnComet() (gas: 247586)
NoncerTest:testGetActiveNonceNested() (gas: 88525)
NoncerTest:testGetActiveNonceReplayable() (gas: 65730)
NoncerTest:testGetActiveNonceSingle() (gas: 44961)
NoncerTest:testGetActiveReplayCount() (gas: 85439)
NoncerTest:testGetActiveReplayCountNested() (gas: 89032)
NoncerTest:testGetActiveReplayCountSingle() (gas: 44824)
NoncerTest:testGetActiveReplayCountWithNonReplaySoftCancel() (gas: 69406)
NoncerTest:testGetActiveReplayCount() (gas: 85364)
NoncerTest:testGetActiveReplayCountNested() (gas: 88957)
NoncerTest:testGetActiveReplayCountSingle() (gas: 44799)
NoncerTest:testGetActiveReplayCountWithNonReplaySoftCancel() (gas: 69325)
NoncerTest:testGetActiveSubmissionTokenNested() (gas: 88031)
NoncerTest:testGetActiveSubmissionTokenReplayable() (gas: 65756)
NoncerTest:testGetActiveSubmissionTokenSingle() (gas: 47765)
NoncerTest:testNestedPlayPullingActiveReplayCount() (gas: 608396)
NoncerTest:testNestedPlayPullingActiveReplayCount() (gas: 608321)
NoncerTest:testPostNestReadsCorrectValue() (gas: 141247)
PaycallTest:testInitializeProperlyFromConstructor() (gas: 6368)
PaycallTest:testPaycallForPayWithUSDT() (gas: 116565)
Expand Down
4 changes: 0 additions & 4 deletions src/quark-core/src/QuarkScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ abstract contract QuarkScript {
bytes32 submissionToken = getActiveSubmissionToken();
uint256 n;

if (submissionToken == QuarkNonceManagerMetadata.EXHAUSTED) {
Copy link
Contributor

Choose a reason for hiding this comment

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

See above line 151:

Note: this may not be accurate after any nested calls from a script

Is that statement still accurate?

Copy link
Collaborator Author

@kevincheng96 kevincheng96 Oct 16, 2024

Choose a reason for hiding this comment

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

Correct, this statement no longer holds. I actually removed this comment in another PR yesterday. See: 5e24a38#diff-a219685a8ac1b6d53f4feb7ad9ab76351cf5f4dd68a30022fc18a4a9ad65467fL151

return 0;
}

for (n = 0; submissionToken != nonce; n++) {
submissionToken = keccak256(abi.encodePacked(submissionToken));
}
Expand Down
Loading