Previously, ledger-tool had a guardrail to disallow a custom accounts path when access mode to the blockstore was Secondary. This was to avoid potentially pulling the accounts out from underneath solana-validator. When ledger-tool switched over to use Secondary blockstore access for all commands that do not need write access, this removed the ability to use custom accounts paths with ledger-tool at all for these commands. Custom accounts paths are desirable, especially if that custom path is in tmpfs to speed up processing. With this change, when a custom accounts path is passed for a command using Secondary access, ledger-tool now checks if Primary access is being held by another process. If not, allow processing to proceed with the custom accounts path. The above check isn't fullproof, but it is about equal to the check that previously existed when ledger-tool would run in Primary access mode when it didn't need to. |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml |