diff --git a/daemon/src/model/cfd.rs b/daemon/src/model/cfd.rs index 10e84e2..0c910f5 100644 --- a/daemon/src/model/cfd.rs +++ b/daemon/src/model/cfd.rs @@ -526,6 +526,17 @@ impl Cfd { dlc, attestation: None, } + } else if let Open { + dlc, attestation, .. + } = self.state.clone() + { + CfdState::Open { + common: CfdStateCommon { + transition_timestamp: SystemTime::now(), + }, + dlc, + attestation, + } } else { bail!( "Cannot transition to Open because of unexpected state {}", diff --git a/daemon/src/monitor.rs b/daemon/src/monitor.rs index f6e36ae..c847b99 100644 --- a/daemon/src/monitor.rs +++ b/daemon/src/monitor.rs @@ -244,7 +244,7 @@ where .entry((revoked_commit_tx.0, revoked_commit_tx.1.clone())) .or_default() .push(( - ScriptStatus::with_confirmations(0), + ScriptStatus::InMempool, Event::RevokedTransactionFound(order_id), )); } diff --git a/daemon/src/setup_contract.rs b/daemon/src/setup_contract.rs index e20c063..e3e43d7 100644 --- a/daemon/src/setup_contract.rs +++ b/daemon/src/setup_contract.rs @@ -314,13 +314,13 @@ pub async fn roll_over( let own_cfd_txs = renew_cfd_transactions( lock_tx.clone(), ( - pk, + maker_identity, maker_lock_amount, dlc.maker_address.clone(), maker_punish_params, ), ( - dlc.identity_counterparty, + taker_identity, taker_lock_amount, dlc.taker_address.clone(), taker_punish_params, diff --git a/daemon/src/taker_cfd.rs b/daemon/src/taker_cfd.rs index fe40288..c6a5231 100644 --- a/daemon/src/taker_cfd.rs +++ b/daemon/src/taker_cfd.rs @@ -407,6 +407,8 @@ impl Actor { .await }); + self.remove_pending_proposal(&order_id) + .context("Could not remove accepted roll over")?; Ok(()) }