Skip to content

Commit

Permalink
Merge pull request #17 from zianksm/feature-node-runner
Browse files Browse the repository at this point in the history
add mandala node runner
  • Loading branch information
zianksm authored Jun 19, 2023
2 parents 055e3ff + ce724c1 commit 76a4528
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 20 additions & 0 deletions mandala-node-runner/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

#[derive(Debug)]
pub enum Error {
Io(std::io::Error),
CouldNotExtractPort,
}

impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::Io(err) => write!(f, "IO error: {err}"),
Error::CouldNotExtractPort => write!(
f,
"could not extract port from running substrate node's stdout"
),
}
}
}

impl std::error::Error for Error {}
4 changes: 1 addition & 3 deletions mandala-node-runner/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.


mod error;

Expand Down

0 comments on commit 76a4528

Please sign in to comment.