Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Ledger-tool: only require ledger dir when necessary #21575

Merged
merged 2 commits into from
Dec 3, 2021

Conversation

CriesofCarrots
Copy link
Contributor

Problem

#15808 improved the ergonomics of solana-ledger-tool by adding a default ledger path, but the tool will always exit if the ledger path does not exist. This is annoying when using solana-ledger-tool bigtable, since most of the subcommands read only from BigTable and don't open the local ledger at all. The current workaround is to create a ledger dir in CWD, or always pass -l <PATH_TO_SOMETHING_THAT_DOES_EXIST>. Yuck.

Summary of Changes

Only canonicalize the ledger_path when ledger_path will actually be used
Also convert this crate to a single use statement, while I'm in the area

@CriesofCarrots CriesofCarrots added v1.8 automerge Merge this Pull Request automatically once CI passes labels Dec 2, 2021
@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label Dec 3, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 3, 2021

automerge label removed due to a CI failure

@CriesofCarrots
Copy link
Contributor Author

Flaky local-cluster

@CriesofCarrots CriesofCarrots merged commit 2b269db into solana-labs:master Dec 3, 2021
mergify bot pushed a commit that referenced this pull request Dec 3, 2021
* Don't canonicalize ledger_path unless ledger_path will be used

* Single use statement

(cherry picked from commit 2b269db)

# Conflicts:
#	ledger-tool/src/main.rs
mergify bot added a commit that referenced this pull request Dec 3, 2021
…#21578)

* Ledger-tool: only require ledger dir when necessary (#21575)

* Don't canonicalize ledger_path unless ledger_path will be used

* Single use statement

(cherry picked from commit 2b269db)

# Conflicts:
#	ledger-tool/src/main.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <[email protected]>
Co-authored-by: Tyera Eulberg <[email protected]>
jbiseda pushed a commit to jbiseda/solana that referenced this pull request Dec 6, 2021
* Don't canonicalize ledger_path unless ledger_path will be used

* Single use statement
t-nelson added a commit to t-nelson/solana that referenced this pull request Dec 13, 2021
CriesofCarrots pushed a commit to CriesofCarrots/solana that referenced this pull request Dec 16, 2021
CriesofCarrots pushed a commit that referenced this pull request Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant