Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Assortment of fixes:
Browse files Browse the repository at this point in the history
* typo in node healthcheck
* update docker down instructions with volumes removal
* print more useful errors when node fails to start
* support for GB and TB in addition to G and T in farmer's `--plot-size`
  • Loading branch information
nazar-pc committed Apr 30, 2022
1 parent 40d9941 commit 0ebf7b3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN \

HEALTHCHECK CMD curl \
-H "Content-Type: application/json" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "system_health", "params": [] }' \
-f "http://localhost:9933"

COPY --from=0 /code/subspace-node /subspace-node
Expand Down
7 changes: 6 additions & 1 deletion crates/subspace-farmer/src/bin/subspace-farmer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ enum Command {
}

fn parse_human_readable_size(s: &str) -> Result<u64, std::num::ParseIntError> {
const SUFFIXES: &[(&str, u64)] = &[("G", 10u64.pow(9)), ("T", 10u64.pow(12))];
const SUFFIXES: &[(&str, u64)] = &[
("G", 10u64.pow(9)),
("GB", 10u64.pow(9)),
("T", 10u64.pow(12)),
("TB", 10u64.pow(12)),
];

SUFFIXES
.iter()
Expand Down
16 changes: 10 additions & 6 deletions crates/subspace-node/src/bin/subspace-node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ fn main() -> std::result::Result<(), Error> {
primary_chain_node_config,
true,
)
.map_err(|_| {
sc_service::Error::Other("Failed to build a full subspace node".into())
.map_err(|error| {
sc_service::Error::Other(format!(
"Failed to build a full subspace node: {}",
error
))
})?
};

Expand All @@ -290,10 +293,11 @@ fn main() -> std::result::Result<(), Error> {
&secondary_chain_cli,
tokio_handle,
)
.map_err(|_| {
sc_service::Error::Other(
"Failed to create secondary chain configuration".into(),
)
.map_err(|error| {
sc_service::Error::Other(format!(
"Failed to create secondary chain configuration: {}",
error
))
})?;

let secondary_chain_full_node_fut = cirrus_node::service::new_full(
Expand Down
2 changes: 1 addition & 1 deletion docs/farming.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Now follow installation guide.

### Docker

In case of Docker setup run `docker-compose down` (and manually delete custom directories if you have specified them).
In case of Docker setup run `docker-compose down -v` (and manually delete custom directories if you have specified them).

Now follow installation guide.

Expand Down

0 comments on commit 0ebf7b3

Please sign in to comment.