Skip to content

Commit

Permalink
Rename all instances of loin to nolooking
Browse files Browse the repository at this point in the history
Co-authored-by: DanGould <[email protected]>
  • Loading branch information
Armin Sabouri and DanGould committed Oct 26, 2022
1 parent bf93b3f commit ac0bb7e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 38 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "loin"
name = "nolooking"
version = "0.1.0"
authors = ["Dan Gould <[email protected]>", "Martin Habovstiak <[email protected]>"]
exclude = ["./tests/compose"]
Expand Down
4 changes: 2 additions & 2 deletions config_spec.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[general]
env_prefix = "LOIN"
env_prefix = "NOLOOKING"
conf_file_param = "conf"
conf_dir_param = "conf_dir"
doc = """
Expand All @@ -11,7 +11,7 @@ This server optimizes your channel opening from a remote wallet which supports P
[[param]]
name = "bind_port"
type = "u16"
doc = "Loin HTTP port to listen on"
doc = "nolooking HTTP port to listen on"
optional = false

[[param]]
Expand Down
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::scheduler::{ScheduledPayJoin, Scheduler, self};
use std::net::SocketAddr;

#[cfg(not(feature = "test_paths"))]
const STATIC_DIR: &str = "/usr/share/loin/static";
const STATIC_DIR: &str = "/usr/share/nolooking/static";

#[cfg(feature = "test_paths")]
const STATIC_DIR: &str = "static";
Expand Down
18 changes: 10 additions & 8 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ mod integration {
use bitcoincore_rpc::{Auth, Client, RpcApi};
use hyper::client::HttpConnector;
use ln_types::P2PAddress;
use loin::scheduler;
use loin::{scheduler::{ScheduledChannel, ScheduledPayJoin, Scheduler}, lnd::LndClient, http};
use nolooking::scheduler;
use nolooking::{scheduler::{ScheduledChannel, ScheduledPayJoin, Scheduler}, lnd::LndClient, http};
use std::collections::HashMap;
use std::convert::TryFrom;
use tempfile::tempdir;
Expand Down Expand Up @@ -51,7 +51,7 @@ mod integration {

};

// merchant lnd loin configuration
// merchant lnd nolooking configuration
let address_str = "https://localhost:53281";
let cert_file = format!("{}/merchant-tls.cert", &tmp_path).to_string();
let macaroon_file = format!("{}/merchant-admin.macaroon", &tmp_path).to_string();
Expand Down Expand Up @@ -98,8 +98,8 @@ mod integration {
"bind_port=3000\nendpoint=\"{}\"\nlnd_address=\"{}\"\nlnd_cert_path=\"{}\"\nlnd_macaroon_path=\"{}\"",
&endpoint.clone().to_string(), &address_str, &cert_file, &macaroon_file
);
let loin_conf = format!("{}/loin.conf", &tmp_path);
std::fs::write(&loin_conf, conf_string).expect("Unable to write loin.conf");
let nolooking_conf = format!("{}/nolooking.conf", &tmp_path);
std::fs::write(&nolooking_conf, conf_string).expect("Unable to write nolooking.conf");

Command::new("docker")
.arg("cp")
Expand Down Expand Up @@ -177,10 +177,10 @@ mod integration {
});

let bind_addr = ([127, 0, 0, 1], 3000).into();
let loin_server = http::serve(scheduler, bind_addr, endpoint.clone());
let nolooking_server = http::serve(scheduler, bind_addr, endpoint.clone());
// trigger payjoin-client
let payjoin_channel_open = tokio::spawn(async move {
// if we don't wait for loin server to run we'll make requests to a closed port
// if we don't wait for nolooking server to run we'll make requests to a closed port
std::thread::sleep(Duration::from_secs(2));
// TODO loop on ping 3000 until it the server is live

Expand Down Expand Up @@ -254,9 +254,11 @@ mod integration {
bitcoin_rpc.generate_to_address(8, &source_address).unwrap();
});

let nolooking_server = http::serve(scheduler, bind_addr, endpoint.clone());

tokio::select! {
_ = payjoin_channel_open => println!("payjoin-client completed first"),
_ = loin_server => println!("loin server stopped first. This shouldn't happen"),
_ = nolooking_server => println!("nolooking server stopped first. This shouldn't happen"),
_ = tokio::time::sleep(Duration::from_secs(20)) => println!("payjoin timed out after 20 seconds"),
};

Expand Down

0 comments on commit ac0bb7e

Please sign in to comment.