Skip to content

chore: correct UNLOCK_BLOCK_TIME comment and drop a dead assignment - #2303

Open
0xrlawrence wants to merge 1 commit into
yetanotherco:stagingfrom
0xrlawrence:chore/small-cleanups
Open

chore: correct UNLOCK_BLOCK_TIME comment and drop a dead assignment#2303
0xrlawrence wants to merge 1 commit into
yetanotherco:stagingfrom
0xrlawrence:chore/small-cleanups

Conversation

@0xrlawrence

Copy link
Copy Markdown

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 describes 100 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 between unlock() and being able to withdraw() — so it can't drift out of sync with the number again.

Dead assignment (aggregator/pkg/server.go). taskIndex was initialized to uint32(0) and then immediately reassigned by the GetTaskIndexRetryable call on the next statement, so the initial value was never read.

Type of change

  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging

Verified with forge build, go vet ./aggregator/pkg/ and gofmt on staging.

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>
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.

1 participant