mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
sync dev branch
This commit is contained in:
commit
f85ca6537b
4 changed files with 26 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,4 +9,6 @@ monero-wallet-rpc.log
|
|||
notes.txt
|
||||
.vscode/settings.json
|
||||
*.bz2
|
||||
*.zip
|
||||
*/monero-x86_64-linux-gnu-v0.18.2.2/**
|
||||
*/i2p-zero-linux.v1.20/**
|
||||
|
|
|
@ -15,7 +15,9 @@ pub mod user; // user rep/service layer
|
|||
pub const NEVMES_JWP_SECRET_KEY: &str = "NEVMES_JWP_SECRET_KEY";
|
||||
pub const NEVMES_JWT_SECRET_KEY: &str = "NEVMES_JWT_SECRET_KEY";
|
||||
|
||||
// set the latest monero release download here
|
||||
/// The latest monero release download
|
||||
pub const MONERO_RELEASE_VERSION: &str = "monero-linux-x64-v0.18.2.2.tar.bz2";
|
||||
/// The latest i2p-zero release version
|
||||
pub const I2P_ZERO_RELEASE_VERSION: &str = "v1.20";
|
||||
|
||||
// DO NOT EDIT BELOW THIS LINE
|
||||
|
|
|
@ -241,9 +241,9 @@ async fn validate_proof(txp: &TxProof) -> TxProof {
|
|||
|
||||
/// Validate that the subaddress in the proof was
|
||||
///
|
||||
/// created by us. TODO(c2m): Store the index for quicker
|
||||
/// created by us. TODO(?): Use xmr rpc call `get_address_index`
|
||||
///
|
||||
/// lookups.
|
||||
/// for faster lookups (check minor > 0)
|
||||
async fn validate_subaddress(subaddress: &String) -> bool {
|
||||
let m_address = monero::get_address().await;
|
||||
let all_address = m_address.result.addresses;
|
||||
|
|
|
@ -422,6 +422,25 @@ pub async fn install_software(installations: Installations) {
|
|||
}
|
||||
if installations.i2p_zero {
|
||||
info!("installing i2p-zero");
|
||||
let i2p_version = crate::I2P_ZERO_RELEASE_VERSION;
|
||||
let i2p_zero_zip = format!("i2p-zero-linux.{}.zip", i2p_version);
|
||||
let link = format!("https://github.com/i2p-zero/i2p-zero/releases/download/{}/{}",
|
||||
i2p_version, i2p_zero_zip);
|
||||
let curl = std::process::Command::new("curl")
|
||||
.args(["-LO#", &link])
|
||||
.status();
|
||||
match curl {
|
||||
Ok(curl_output) => {
|
||||
debug!("{:?}", curl_output);
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
let unzip_output = std::process::Command::new("unzip")
|
||||
.arg(i2p_zero_zip)
|
||||
.spawn()
|
||||
.expect("i2p unzip failed");
|
||||
debug!("{:?}", unzip_output.stdout);
|
||||
},
|
||||
_=> error!("i2p-zero download failed")
|
||||
}
|
||||
}
|
||||
if installations.xmr {
|
||||
info!("installing monero");
|
||||
|
|
Loading…
Reference in a new issue