Skip to content
Closed
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
2 changes: 1 addition & 1 deletion cmd/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (

// TODO(roasbeef): expose all fee conf targets

const defaultRecoveryWindow int32 = 2500
const defaultRecoveryWindow int32 = 31000

Choose a reason for hiding this comment

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

medium

To improve maintainability and provide context for this change, it would be helpful to add a comment explaining why defaultRecoveryWindow is being increased to this specific value. This will help future developers understand the reasoning behind this choice, in line with the style guide's recommendation to explain the 'why' behind code changes.

For example:

// defaultRecoveryWindow is the default number of addresses to scan ahead for
// when recovering a wallet. This value was increased from 2500 to 31000 based
// on user reports of incomplete recovery with the lower value.
const defaultRecoveryWindow int32 = 31000
References
  1. The style guide states that comments should explain the 'why' behind a certain block of code, especially if it requires contextual knowledge not immediately obvious from the code itself. Adding a comment here would clarify the motivation for this specific value. (link)


const (
defaultUtxoMinConf = 1
Expand Down
Loading