Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/builder/transaction/operator_collateral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions core/src/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/extended_bitcoin_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
1 change: 1 addition & 0 deletions core/src/states/kickoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ impl<T: Owner> KickoffStateMachine<T> {
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,
Expand Down
Loading