Commit e3ee45b8 authored by Stavros Korokithakis's avatar Stavros Korokithakis

Add Eternum pinging

parent 80128908
......@@ -236,6 +236,8 @@ fn start_ipfs() {
info!("Daemon is up, continuing...");
// Connect this node to Eternum directly.
......@@ -320,6 +322,21 @@ fn create_watcher() {
/// Send a request to Eternum, for estimating how many Hearth installations there are.
/// IP addresses or other identifying data is not stored.
fn ping_eternum() {
let output = Command::new(IPFS_EXECUTABLE)
.args(&["id", "-f", "<id>"])
.expect("Could not get peer ID.");
let peer_id = String::from_utf8(output.stdout).unwrap();
let client = reqwest::Client::new();
let _ = client.get(format!("{}", peer_id).as_str()).send();
fn main() {
let matches = App::new("Hearth")
.author("by Stavros and Stelios")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment