Browse Source
Migrate `do_send_async` to `send`
These handlers never fail and we are always connected.
pAndLAndPayout
Thomas Eizinger
3 years ago
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
2 changed files with
8 additions and
4 deletions
-
daemon/src/maker_cfd.rs
-
daemon/src/taker_cfd.rs
|
|
@ -622,8 +622,9 @@ where |
|
|
|
tokio::spawn(async move { |
|
|
|
let dlc = contract_future.await; |
|
|
|
|
|
|
|
this.do_send_async(CfdSetupCompleted { order_id, dlc }) |
|
|
|
this.send(CfdSetupCompleted { order_id, dlc }) |
|
|
|
.await |
|
|
|
.expect("always connected to ourselves"); |
|
|
|
}); |
|
|
|
|
|
|
|
// 6. Record that we are in an active contract setup
|
|
|
@ -789,8 +790,9 @@ where |
|
|
|
tokio::spawn(async move { |
|
|
|
let dlc = contract_future.await; |
|
|
|
|
|
|
|
this.do_send_async(CfdRollOverCompleted { order_id, dlc }) |
|
|
|
this.send(CfdRollOverCompleted { order_id, dlc }) |
|
|
|
.await |
|
|
|
.expect("always connected to ourselves") |
|
|
|
}); |
|
|
|
|
|
|
|
self.remove_pending_proposal(&order_id) |
|
|
|
|
|
@ -518,8 +518,9 @@ where |
|
|
|
tokio::spawn(async move { |
|
|
|
let dlc = contract_future.await; |
|
|
|
|
|
|
|
this.do_send_async(CfdSetupCompleted { order_id, dlc }) |
|
|
|
this.send(CfdSetupCompleted { order_id, dlc }) |
|
|
|
.await |
|
|
|
.expect("always connected to ourselves") |
|
|
|
}); |
|
|
|
|
|
|
|
self.setup_state = SetupState::Active { sender }; |
|
|
@ -582,8 +583,9 @@ where |
|
|
|
tokio::spawn(async move { |
|
|
|
let dlc = contract_future.await; |
|
|
|
|
|
|
|
this.do_send_async(CfdRollOverCompleted { order_id, dlc }) |
|
|
|
this.send(CfdRollOverCompleted { order_id, dlc }) |
|
|
|
.await |
|
|
|
.expect("always connected to ourselves") |
|
|
|
}); |
|
|
|
|
|
|
|
self.remove_pending_proposal(&order_id) |
|
|
|