Skip to content

Conversation

@mkoura
Copy link
Collaborator

@mkoura mkoura commented Jan 29, 2026

Split node config editing in start scripts into two dedicated functions: edit_genesis_conf and edit_utxo_backend_conf, now defined in common.sh. This improves maintainability and clarity by separating genesis and UTXO backend configuration logic. The start scripts now call these functions for each node config, reducing duplication and making future changes easier.

Copy link

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

Refactors node config editing in the cluster start scripts by extracting the genesis-hash editing and UTXO backend selection/editing logic into dedicated helper functions in common.sh, reducing duplication across start modes.

Changes:

  • Added edit_genesis_conf and edit_utxo_backend_conf to encapsulate config mutation logic via jq.
  • Updated common-start-slow and common-start-fast to call the new helpers for each node config.
  • Adjusted file handling so edits are applied to a dedicated target path (conf_target) in the state directory.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/cardonnay_scripts/scripts/common/common.sh Introduces the two new helper functions that apply genesis hash and UTXO backend config edits.
src/cardonnay_scripts/scripts/common/common-start-slow Replaces inline jq config editing with calls to the new helper functions (copy + edit).
src/cardonnay_scripts/scripts/common/common-start-fast Replaces inline genesis/UTXO backend edits with calls to the new helper functions (jq + edit).

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

Split node config editing in start scripts into two dedicated functions:
`edit_genesis_conf` and `edit_utxo_backend_conf`, now defined in
`common.sh`. This improves maintainability and clarity by separating
genesis and UTXO backend configuration logic. The start scripts now call
these functions for each node config, reducing duplication and making
future changes easier.
@mkoura mkoura merged commit 0312e6c into master Jan 29, 2026
1 check passed
@mkoura mkoura deleted the dry_edit_config branch January 29, 2026 17:17
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