Skip to content

Commit

Permalink
syncer: trivial, borrow only
Browse files Browse the repository at this point in the history
  • Loading branch information
zkao committed Jul 9, 2022
1 parent 917851c commit 9a2639b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/swapd/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ impl Runtime {
)?
}
} else {
error!("Not Some(address) or not Some(btc_per_kvb)");
error!("Not Some(address) or not Some(sat_per_kvb)");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/syncerd/syncer_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ impl SyncerState {
.insert(self.task_count.into(), source.clone());

// try to emit an event immediately from the cached values
if let Some(fee_estimations) = self.fee_estimation.clone() {
if let Some(ref fee_estimations) = &self.fee_estimation {
send_event(
&self.tx_event,
&mut vec![(
Event::FeeEstimation(FeeEstimation {
id: task.id,
fee_estimations,
fee_estimations: fee_estimations.clone(),
}),
source,
)],
Expand Down Expand Up @@ -622,7 +622,7 @@ impl SyncerState {

pub async fn fee_estimated(&mut self, fee_estimations: FeeEstimations) {
// Emit fee estimation events
if self.fee_estimation != Some(fee_estimations.clone()) {
if self.fee_estimation.as_ref() != Some(&fee_estimations) {
for (id, task) in self.watch_fee_estimation.iter() {
send_event(
&self.tx_event,
Expand Down

0 comments on commit 9a2639b

Please sign in to comment.