mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 03:47:59 +00:00
Factor substrate node runner into separate crate (#913)
* factor out node starting thing to separate crate to use in test-runtime and integration-tests * remove subxt dep on test-runtime build, and clippy tidyup * remove now-unneeded dep * Update testing/substrate-runner/Cargo.toml Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> * Update testing/integration-tests/Cargo.toml Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * remove unneeded port things for backward compat --------- Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// 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.
|
||||
|
||||
#[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 {}
|
||||
Reference in New Issue
Block a user