chore: correct UNLOCK_BLOCK_TIME comment and drop a dead assignment - #2303
Open
0xrlawrence wants to merge 1 commit into
Open
chore: correct UNLOCK_BLOCK_TIME comment and drop a dead assignment#23030xrlawrence wants to merge 1 commit into
0xrlawrence wants to merge 1 commit into
Conversation
The comment above UNLOCK_BLOCK_TIME describes 100 blocks at 12 seconds, which is 1200 seconds, but the constant is 3600. Describe what the value is for instead of restating a number that does not match it. In ProcessOperatorSignedTaskResponseV2, taskIndex was initialized to zero and then immediately reassigned by the GetTaskIndexRetryable call on the following statement, so the initial value was never read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two unrelated one-line cleanups, grouped so they don't need a PR each.
Stale comment on
UNLOCK_BLOCK_TIME(BatcherPaymentService.sol). The comment describes100 Blocks * 12 second block time, which is 1200 seconds, above a constant set to 3600. Rather than correct the arithmetic, the comment now says what the value is for — the delay betweenunlock()and being able towithdraw()— so it can't drift out of sync with the number again.Dead assignment (
aggregator/pkg/server.go).taskIndexwas initialized touint32(0)and then immediately reassigned by theGetTaskIndexRetryablecall on the next statement, so the initial value was never read.Type of change
Checklist
testnet, everything else tostagingVerified with
forge build,go vet ./aggregator/pkg/andgofmtonstaging.