eth_watch: implement priority queue access
@@ -79,6 +79,10 @@ pub enum EthWatchRequest {
pubkey_hash: PubKeyHash,
resp: oneshot::Sender<bool>,
},
+ GetPriorityOpBySerialId {
+ serial_id: u64,
+ resp: oneshot::Sender<Option<PriorityOp>>,
+ },
GetPriorityQueueOps {
op_start_id: u64,
max_chunks: usize,
@@ -521,6 +525,15 @@ impl<W: EthClient> EthWatch<W> {
.unwrap_or(false);
resp.send(authorized).unwrap_or_default();
}
+ EthWatchRequest::GetPriorityOpBySerialId { serial_id, resp } => {
+ resp.send(
+ self.eth_state
+ .priority_queue()
+ .get(&serial_id)
+ .map(|received_op| received_op.as_ref().clone()),
+ )
+ .unwrap_or_default();
+ }
}
}
}
