@@ -71,6 +71,9 @@ pub const RECONNECT_SHORT_SLEEP_DELAY: u64 = 10;
7171pub const RECONNECT_LONG_SLEEP_DELAY : u64 = 60 ;
7272pub const SHORT_LONG_SLEEP_DELAY_TRANSITION : u32 = 60 ;
7373pub const RECONNECT_ATTEMPT_TIMEOUT_SEC : u64 = 300 ;
74+ // TODO: Maker should decide this miner fee
75+ // This fee is used for both funding and contract txs.
76+ pub const MINER_FEE : u64 = 1000 ;
7477
7578/// Swap specific parameters. These are user's policy and can differ among swaps.
7679/// SwapParams govern the criteria to find suitable set of makers from the offerbook.
@@ -87,8 +90,6 @@ pub struct SwapParams {
8790 // TODO: Following two should be moved to TakerConfig as global configuration.
8891 /// Confirmation count required for funding txs.
8992 pub required_confirms : u64 ,
90- /// Fee rate for funding txs.
91- pub fee_rate : Amount ,
9293}
9394
9495// Defines the Taker's position in the current ongoing swap.
@@ -463,7 +464,7 @@ impl Taker {
463464 & hashlock_pubkeys,
464465 self . get_preimage_hash ( ) ,
465466 swap_locktime,
466- self . ongoing_swap_state . swap_params . fee_rate ,
467+ Amount :: from_sat ( MINER_FEE ) ,
467468 ) ?;
468469
469470 let contract_reedemscripts = outgoing_swapcoins
@@ -954,7 +955,7 @@ impl Taker {
954955 next_peer_multisig_pubkeys : next_peer_multisig_pubkeys. clone ( ) ,
955956 next_peer_hashlock_pubkeys : next_peer_hashlock_pubkeys. clone ( ) ,
956957 next_maker_refund_locktime : maker_refund_locktime,
957- next_maker_fee_rate : self . ongoing_swap_state . swap_params . fee_rate ,
958+ next_maker_fee_rate : Amount :: from_sat ( MINER_FEE ) ,
958959 } ;
959960
960961 let this_maker_info = ThisMakerInfo {
@@ -1196,7 +1197,7 @@ impl Taker {
11961197 previous_funding_output,
11971198 maker_funding_tx_value,
11981199 next_contract_redeemscript,
1199- self . ongoing_swap_state . swap_params . fee_rate ,
1200+ Amount :: from_sat ( MINER_FEE ) ,
12001201 )
12011202 } ,
12021203 )
0 commit comments