diff --git a/core/src/builder/transaction/operator_collateral.rs b/core/src/builder/transaction/operator_collateral.rs index 69ec236e4..4f773b62f 100644 --- a/core/src/builder/transaction/operator_collateral.rs +++ b/core/src/builder/transaction/operator_collateral.rs @@ -21,6 +21,7 @@ use crate::builder::transaction::output::UnspentTxOut; use crate::builder::transaction::txhandler::TxHandler; use crate::builder::transaction::*; use crate::config::protocol::ProtocolParamset; +use crate::constants::MIN_TAPROOT_AMOUNT; use crate::errors::BridgeError; use crate::rpc::clementine::NumberedSignatureKind; use bitcoin::Sequence; @@ -407,7 +408,8 @@ pub fn create_burn_unused_kickoff_connectors_txhandler( Sequence::from_height(1), ); } - if !paramset.bridge_nonstandard && input_amount >= paramset.anchor_amount() { + if !paramset.bridge_nonstandard && input_amount >= paramset.anchor_amount() + MIN_TAPROOT_AMOUNT + { // if we use standard tx's, kickoff utxo's will hold some sats so we can return the change to the change address // but if we use nonstandard tx's with 0 sat values then the change is 0 anyway, no need to add an output tx_handler_builder = tx_handler_builder.add_output(UnspentTxOut::from_partial(TxOut { diff --git a/core/src/deposit.rs b/core/src/deposit.rs index c12721eeb..d39837d2f 100644 --- a/core/src/deposit.rs +++ b/core/src/deposit.rs @@ -216,8 +216,8 @@ impl DepositData { /// Checks if all watchtowers are unique. pub fn are_all_watchtowers_unique(&self) -> bool { - let set: HashSet<_> = self.actors.watchtowers.iter().collect(); - set.len() == self.actors.watchtowers.len() + let set: HashSet<_> = self.get_watchtowers().into_iter().collect(); + set.len() == self.get_num_watchtowers() } /// Checks if all operators are unique. diff --git a/core/src/extended_bitcoin_rpc.rs b/core/src/extended_bitcoin_rpc.rs index 64306635e..b04386052 100644 --- a/core/src/extended_bitcoin_rpc.rs +++ b/core/src/extended_bitcoin_rpc.rs @@ -1037,7 +1037,7 @@ impl ExtendedBitcoinRpc { ) .wrap_err("Failed to convert fee to sat")?; - let current_fee_rate_sat_kwu = current_fee_sat as f64 / tx_weight as f64 * 1000.0; + let current_fee_rate_sat_kwu = current_fee_sat as f64 * 1000.0 / tx_weight as f64; tracing::trace!( "Bump fee with fee rate txid: {txid} - Current fee sat: {current_fee_sat} - current fee rate: {current_fee_rate_sat_kwu}" diff --git a/core/src/states/kickoff.rs b/core/src/states/kickoff.rs index 482e23ad5..a4609cdba 100644 --- a/core/src/states/kickoff.rs +++ b/core/src/states/kickoff.rs @@ -454,6 +454,7 @@ impl KickoffStateMachine { self.create_matcher_for_latest_blockhash_if_ready(context) .await; self.send_operator_asserts_if_ready(context).await; + self.disprove_if_ready(context).await; Handled } // When an operator assert is detected in Bitcoin,