Compare commits
2 Commits
dd075508b7
...
v0.2.2-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5fe22cc14
|
|||
|
83749afddd
|
@@ -36,7 +36,7 @@ use std::time::Instant;
|
||||
|
||||
|
||||
const LOCKTIME_THRESHOLD:i64 = 5000000;
|
||||
const VERSION:&str = "0.0.1";
|
||||
const VERSION:&str = "0.0.2";
|
||||
#[derive(Debug, Clone,Serialize, Deserialize)]
|
||||
struct MyConfig {
|
||||
zmq_listener: String,
|
||||
|
||||
@@ -34,7 +34,7 @@ use crate::db::{ create_database, get_next_address_index, insert_xpub, save_new_
|
||||
#[path = "../xpub.rs"]
|
||||
mod xpub;
|
||||
use crate::xpub::new_address_from_xpub;
|
||||
const VERSION:&str="0.2.1";
|
||||
const VERSION:&str="0.2.2";
|
||||
const NETWORKS : [&str; 4]= ["bitcoin","testnet","signet","regtest"];
|
||||
#[derive(Debug, Clone,Serialize, Deserialize)]
|
||||
struct NetConfig {
|
||||
@@ -112,6 +112,11 @@ async fn echo_version(
|
||||
) -> Result<Response<BoxBody<Bytes, hyper::Error>>, hyper::Error> {
|
||||
Ok(Response::new(full(VERSION)))
|
||||
}
|
||||
async fn echo_home(cfg: &MyConfig
|
||||
) -> Result<Response<BoxBody<Bytes, hyper::Error>>, hyper::Error> {
|
||||
debug!("echo_home: {}", cfg.info );
|
||||
Ok(Response::new(full(cfg.info.clone())))
|
||||
}
|
||||
async fn echo_pub_key(
|
||||
cfg: &MyConfig,
|
||||
) -> Result<Response<BoxBody<Bytes, hyper::Error>>, hyper::Error> {
|
||||
@@ -454,6 +459,9 @@ async fn echo(
|
||||
if uri=="/.pub_key.pem" {
|
||||
ret = echo_pub_key(cfg).await;
|
||||
}
|
||||
if uri=="/"{
|
||||
ret = echo_home(cfg).await;
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user