Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Improve error handling when blockchain is loaded #40

Merged
merged 4 commits into from
Nov 1, 2018

Conversation

mzabaluev
Copy link
Contributor

Fixes #38, also improves some code around.

Mikhail Zabaluev added 4 commits October 31, 2018 16:03
It should be possible to gracefully recover from blockchain loading
failures.
Use of a generic parameter type bound with `AsRef<Path>` allows
references and plain strings to be used as the argument.
Return Err with a printable error value when the storage fails to
initialize, or when the config file cannot be loaded.
@NicolasDP NicolasDP self-requested a review October 31, 2018 16:01
@NicolasDP NicolasDP added this to the alpha3 milestone Oct 31, 2018
) -> PathBuf
{
root_dir.join(BLOCKCHAINS_DIRECTORY)
pub fn blockchains_directory<P: AsRef<Path>>(root_dir: P) -> PathBuf {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@NicolasDP NicolasDP left a comment

Choose a reason for hiding this comment

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

LGTM

@NicolasDP NicolasDP merged commit b00db11 into input-output-hk:master Nov 1, 2018
@rdlrt rdlrt mentioned this pull request Apr 9, 2019
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.

2 participants