mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-08 06:22:39 -04:00
Add config/argument to swap/asb to configure bitcoin tx fees.
This commit is contained in:
parent
9e8b788aa9
commit
46e0449b8e
4 changed files with 65 additions and 11 deletions
|
@ -15,6 +15,9 @@ const DEFAULT_ELECTRUM_RPC_URL: &str = "ssl://electrum.blockstream.info:60002";
|
|||
|
||||
const DEFAULT_TOR_SOCKS5_PORT: &str = "9050";
|
||||
|
||||
// Bitcoin transactions should be confirmed within X blocks
|
||||
const DEFAUL_BITCOIN_CONFIRMATION_TARGET: &str = "3";
|
||||
|
||||
#[derive(structopt::StructOpt, Debug)]
|
||||
#[structopt(name = "swap", about = "CLI for swapping BTC for XMR", author)]
|
||||
pub struct Arguments {
|
||||
|
@ -53,6 +56,9 @@ pub enum Command {
|
|||
|
||||
#[structopt(long = "tor-socks5-port", help = "Your local Tor socks5 proxy port", default_value = DEFAULT_TOR_SOCKS5_PORT)]
|
||||
tor_socks5_port: u16,
|
||||
|
||||
#[structopt(long = "bitcoin-target-block", help = "Within how many blocks should the Bitcoin transactions be confirmed.", default_value = DEFAUL_BITCOIN_CONFIRMATION_TARGET)]
|
||||
bitcoin_target_block: usize,
|
||||
},
|
||||
/// Show a list of past ongoing and completed swaps
|
||||
History,
|
||||
|
@ -78,6 +84,9 @@ pub enum Command {
|
|||
|
||||
#[structopt(long = "tor-socks5-port", help = "Your local Tor socks5 proxy port", default_value = DEFAULT_TOR_SOCKS5_PORT)]
|
||||
tor_socks5_port: u16,
|
||||
|
||||
#[structopt(long = "bitcoin-target-block", help = "Within how many blocks should the Bitcoin transactions be confirmed.", default_value = DEFAUL_BITCOIN_CONFIRMATION_TARGET)]
|
||||
bitcoin_target_block: usize,
|
||||
},
|
||||
/// Try to cancel an ongoing swap (expert users only)
|
||||
Cancel {
|
||||
|
@ -95,6 +104,9 @@ pub enum Command {
|
|||
default_value = DEFAULT_ELECTRUM_RPC_URL
|
||||
)]
|
||||
electrum_rpc_url: Url,
|
||||
|
||||
#[structopt(long = "bitcoin-target-block", help = "Within how many blocks should the Bitcoin transactions be confirmed.", default_value = DEFAUL_BITCOIN_CONFIRMATION_TARGET)]
|
||||
bitcoin_target_block: usize,
|
||||
},
|
||||
/// Try to cancel a swap and refund my BTC (expert users only)
|
||||
Refund {
|
||||
|
@ -112,6 +124,9 @@ pub enum Command {
|
|||
default_value = DEFAULT_ELECTRUM_RPC_URL
|
||||
)]
|
||||
electrum_rpc_url: Url,
|
||||
|
||||
#[structopt(long = "bitcoin-target-block", help = "Within how many blocks should the Bitcoin transactions be confirmed.", default_value = DEFAUL_BITCOIN_CONFIRMATION_TARGET)]
|
||||
bitcoin_target_block: usize,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue