Skip to content

Conversation

@alexzaitsev
Copy link
Contributor

@alexzaitsev alexzaitsev commented Mar 8, 2025

Addressing #217
Logic:

  1. If sim file is present (absolute or relative, doesn't matter) - use it.
  2. If it's not present as it is - fallback to the current behaviour:
    a. try to join with data_dir, if it's present -great
    b. if it's not present - fallback to datadir lookup
  3. If it's neither present of relative path - fallback to datadir lookup.

@carlaKC carlaKC self-requested a review March 11, 2025 17:12
Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

tACK 94f56c6, such a nice UX improvement 🥇

Cases tested:

  1. Custom sim file and custom data dir: sim-cli -s custom_sim.json -d custom_data_dir/
custom_sim.json
custom_data_dir/
  1. Custom sim file in custom data dir: sim-cli -s custom_sim.json -d custom_data_dir/:
custom_data_dir/custom_sim.json
  1. Default sim file in custom data dir: sim-cli -d custom_data_dir
custom_data_dir/sim.json

The only this that could be confusing with this UX is if you have a sim file with the same name in multiple locations, eg:

duplicate_sim.json
custom_data_dir/duplicate_sim.json

sim-cli -s custom_sim.json -d custom_data_dir/ will use the one in the current directory, which I think is the right decision.

@carlaKC carlaKC merged commit a1ca5ac into bitcoin-dev-project:main Mar 12, 2025
2 checks passed
@alexzaitsev alexzaitsev deleted the int-betw-sim-path-and-res-dir branch March 15, 2025 04:24
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 16, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
chuksys pushed a commit to chuksys/sim-ln that referenced this pull request Mar 17, 2025
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