Browse Source

Revert "Re-use order fee rate for close transaction"

resilient-broadcast
Lucas Soriano 3 years ago
committed by GitHub
parent
commit
c25d000e44
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Cargo.lock
  2. 2
      daemon/src/collab_settlement_taker.rs
  3. 2
      daemon/src/maker_cfd.rs
  4. 2
      daemon/src/model/cfd.rs

2
Cargo.lock

@ -1426,7 +1426,7 @@ dependencies = [
[[package]] [[package]]
name = "maia" name = "maia"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/comit-network/maia#a6846a244131108d93c62167c401e85d87d874bf" source = "git+https://github.com/comit-network/maia#baaad94a10291d4e55c3d2cd30f3736035ee10ea"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bdk", "bdk",

2
daemon/src/collab_settlement_taker.rs

@ -72,7 +72,7 @@ impl Actor {
let dlc = self.cfd.dlc().context("No DLC in CFD")?; let dlc = self.cfd.dlc().context("No DLC in CFD")?;
let (tx, sig) = dlc.close_transaction(&self.proposal, self.cfd.order.fee_rate)?; let (tx, sig) = dlc.close_transaction(&self.proposal)?;
// Need to use `do_send_async` here because this handler is called in // Need to use `do_send_async` here because this handler is called in
// context of a message arriving over the wire, and would result in a // context of a message arriving over the wire, and would result in a

2
daemon/src/maker_cfd.rs

@ -865,7 +865,7 @@ where
let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?; let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?;
let dlc = cfd.open_dlc().context("CFD was in wrong state")?; let dlc = cfd.open_dlc().context("CFD was in wrong state")?;
let (tx, sig_maker) = dlc.close_transaction(proposal, cfd.order.fee_rate)?; let (tx, sig_maker) = dlc.close_transaction(proposal)?;
let own_script_pubkey = dlc.script_pubkey_for(cfd.role()); let own_script_pubkey = dlc.script_pubkey_for(cfd.role());
cfd.handle_proposal_signed(CollaborativeSettlement::new( cfd.handle_proposal_signed(CollaborativeSettlement::new(

2
daemon/src/model/cfd.rs

@ -1445,7 +1445,6 @@ impl Dlc {
pub fn close_transaction( pub fn close_transaction(
&self, &self,
proposal: &crate::model::cfd::SettlementProposal, proposal: &crate::model::cfd::SettlementProposal,
fee_rate: u32,
) -> Result<(Transaction, Signature)> { ) -> Result<(Transaction, Signature)> {
let (lock_tx, lock_desc) = &self.lock; let (lock_tx, lock_desc) = &self.lock;
let (lock_outpoint, lock_amount) = { let (lock_outpoint, lock_amount) = {
@ -1462,7 +1461,6 @@ impl Dlc {
lock_amount, lock_amount,
(&self.maker_address, proposal.maker), (&self.maker_address, proposal.maker),
(&self.taker_address, proposal.taker), (&self.taker_address, proposal.taker),
fee_rate,
) )
.context("Unable to collaborative close transaction")?; .context("Unable to collaborative close transaction")?;

Loading…
Cancel
Save