mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Merge #801
801: Update monero wallet rpc r=rishflab a=rishflab #794 Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Co-authored-by: rishflab <rishflab@hotmail.com>
This commit is contained in:
commit
7be6655d73
@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
The sqlite database filed is named `sqlite` and is found in the data directory.
|
||||
You can print the data directory using the `config` subcommand.
|
||||
The schema can be found here [here](swap/migrations/20210903050345_create_swaps_table.sql).
|
||||
- Upgraded monero-wallet-rpc to use version v0.17.2.3.
|
||||
This resolved a bug for a user where the redeemed monero transaction was not being accepted by the v0.17.2.0.
|
||||
|
||||
#### Database migration guide
|
||||
|
||||
|
@ -18,17 +18,17 @@ use tokio_util::io::StreamReader;
|
||||
compile_error!("unsupported operating system");
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
const DOWNLOAD_URL: &str = "http://downloads.getmonero.org/cli/monero-mac-x64-v0.17.2.0.tar.bz2";
|
||||
const DOWNLOAD_URL: &str = "http://downloads.getmonero.org/cli/monero-mac-x64-v0.17.2.3.tar.bz2";
|
||||
|
||||
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
||||
const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.2.0.tar.bz2";
|
||||
const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.2.3.tar.bz2";
|
||||
|
||||
#[cfg(all(target_os = "linux", target_arch = "arm"))]
|
||||
const DOWNLOAD_URL: &str =
|
||||
"https://downloads.getmonero.org/cli/monero-linux-armv7-v0.17.2.0.tar.bz2";
|
||||
"https://downloads.getmonero.org/cli/monero-linux-armv7-v0.17.2.3.tar.bz2";
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-win-x64-v0.17.2.0.zip";
|
||||
const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-win-x64-v0.17.2.3.zip";
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
const PACKED_FILE: &str = "monero-wallet-rpc";
|
||||
@ -72,6 +72,23 @@ impl WalletRpc {
|
||||
remove_file(monero_wallet_rpc.archive_path()).await?;
|
||||
}
|
||||
|
||||
// If the monero-wallet-rpc exists, identify it's version and delete it if the
|
||||
// version is not the v0.17.2.3-release. Unfortunately monero does no
|
||||
// provide per file checksums which would of been a better solution.
|
||||
if monero_wallet_rpc.exec_path().exists() {
|
||||
let output = Command::new(monero_wallet_rpc.exec_path())
|
||||
.env("LANG", "en_AU.UTF-8")
|
||||
.stdout(Stdio::piped())
|
||||
.kill_on_drop(true)
|
||||
.arg("--version")
|
||||
.output()
|
||||
.await?;
|
||||
let version_string = String::from_utf8_lossy(&output.stdout);
|
||||
if !version_string.contains("v0.17.2.3-release") {
|
||||
remove_file(monero_wallet_rpc.exec_path()).await?;
|
||||
}
|
||||
}
|
||||
|
||||
if !monero_wallet_rpc.exec_path().exists() {
|
||||
let mut options = OpenOptions::new();
|
||||
let mut file = options
|
||||
|
Loading…
Reference in New Issue
Block a user