Skip to content

fix: Correct typo and remove unused variables in#1958

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Dec 18, 2025
Merged

fix: Correct typo and remove unused variables in#1958
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 18, 2025 06:38
@mkmccarty mkmccarty merged commit 53659c3 into main Dec 18, 2025
14 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch December 18, 2025 06:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a typo (quantStonts to quantStones) and adjusts variable scope in the contract duration estimation logic. The typo corrections ensure consistency in variable naming throughout the code. The variable scope changes move tachStones and quantStones declarations from the outer loop scope into the conditional block where they are actually used (when slots == 10.0).

Key changes:

  • Fixed typo: quantStontsquantStones in two locations
  • Moved tachStones and quantStones variable declarations to narrower scope within the slots == 10.0 conditional block
  • Changed third return value assignment from getContractDurationEstimate to use blank identifier

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/boost/estimate_time.go Fixed typo in variable name and moved variable declarations to appropriate scope within the slots==10.0 conditional
src/boost/boost_import.go Replaced EstimatedDurationMax assignment with blank identifier for the third return value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/boost/boost_import.go
c.Grade[grade].LengthInSeconds = c.LengthInSeconds

c.Grade[grade].EstimatedDuration, c.Grade[grade].EstimatedDurationLower, c.Grade[grade].EstimatedDurationMax = getContractDurationEstimate(c.TargetAmount[len(c.TargetAmount)-1], float64(c.MaxCoopSize), c.LengthInSeconds,
c.Grade[grade].EstimatedDuration, c.Grade[grade].EstimatedDurationLower, _ = getContractDurationEstimate(c.TargetAmount[len(c.TargetAmount)-1], float64(c.MaxCoopSize), c.LengthInSeconds,
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The third return value from getContractDurationEstimate (EstimatedDurationMax) is being discarded, but this value is still used elsewhere in the codebase. Specifically, it's used on line 283 of this file for calculating durationMod and on line 426 of src/boost/replay.go for displaying estimated duration. This will cause the EstimatedDurationMax field to remain uninitialized (zero value) for grade-specific estimates, which could lead to incorrect calculations or display issues.

Suggested change
c.Grade[grade].EstimatedDuration, c.Grade[grade].EstimatedDurationLower, _ = getContractDurationEstimate(c.TargetAmount[len(c.TargetAmount)-1], float64(c.MaxCoopSize), c.LengthInSeconds,
c.Grade[grade].EstimatedDuration, c.Grade[grade].EstimatedDurationLower, c.Grade[grade].EstimatedDurationMax = getContractDurationEstimate(c.TargetAmount[len(c.TargetAmount)-1], float64(c.MaxCoopSize), c.LengthInSeconds,

Copilot uses AI. Check for mistakes.
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.

2 participants