Remove support for the sled database

This commit is contained in:
rishflab 2021-10-13 10:38:56 +11:00
parent 97c11e4177
commit d1f6739e59
9 changed files with 23 additions and 552 deletions

View file

@ -33,7 +33,6 @@ pub struct Arguments {
pub env_config: env::Config,
pub debug: bool,
pub json: bool,
pub sled: bool,
pub data_dir: PathBuf,
pub cmd: Command,
}
@ -67,7 +66,6 @@ where
let debug = args.debug;
let json = args.json;
let sled = args.sled;
let is_testnet = args.testnet;
let data = args.data;
@ -92,7 +90,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::BuyXmr {
seller,
@ -109,7 +106,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::History,
},
@ -117,7 +113,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Config,
},
@ -135,7 +130,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Balance {
bitcoin_electrum_rpc_url,
@ -155,7 +149,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::WithdrawBtc {
bitcoin_electrum_rpc_url,
@ -179,7 +172,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Resume {
swap_id,
@ -201,7 +193,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Cancel {
swap_id,
@ -221,7 +212,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Refund {
swap_id,
@ -237,7 +227,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::ListSellers {
rendezvous_point,
@ -253,7 +242,6 @@ where
env_config: env_config_from(is_testnet),
debug,
json,
sled,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::ExportBitcoinWallet {
bitcoin_electrum_rpc_url,
@ -349,13 +337,6 @@ struct RawArguments {
)]
json: bool,
#[structopt(
short,
long = "sled",
help = "Forces the swap-cli to use the deprecated sled db if it is available"
)]
sled: bool,
#[structopt(subcommand)]
cmd: RawCommand,
}
@ -1164,7 +1145,6 @@ mod tests {
env_config: env::Testnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(TESTNET),
cmd: Command::BuyXmr {
seller: Multiaddr::from_str(MULTI_ADDRESS).unwrap(),
@ -1185,7 +1165,6 @@ mod tests {
env_config: env::Mainnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(MAINNET),
cmd: Command::BuyXmr {
seller: Multiaddr::from_str(MULTI_ADDRESS).unwrap(),
@ -1205,7 +1184,6 @@ mod tests {
env_config: env::Testnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(TESTNET),
cmd: Command::Resume {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),
@ -1223,7 +1201,6 @@ mod tests {
env_config: env::Mainnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(MAINNET),
cmd: Command::Resume {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),
@ -1240,7 +1217,6 @@ mod tests {
env_config: env::Testnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(TESTNET),
cmd: Command::Cancel {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),
@ -1256,7 +1232,6 @@ mod tests {
env_config: env::Mainnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(MAINNET),
cmd: Command::Cancel {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),
@ -1271,7 +1246,6 @@ mod tests {
env_config: env::Testnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(TESTNET),
cmd: Command::Refund {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),
@ -1287,7 +1261,6 @@ mod tests {
env_config: env::Mainnet::get_config(),
debug: false,
json: false,
sled: false,
data_dir: data_dir_path_cli().join(MAINNET),
cmd: Command::Refund {
swap_id: Uuid::from_str(SWAP_ID).unwrap(),