diff --git a/daemon/src/oracle.rs b/daemon/src/oracle.rs index 153cf8c..3c5f63b 100644 --- a/daemon/src/oracle.rs +++ b/daemon/src/oracle.rs @@ -224,13 +224,20 @@ impl xtra::Handler for Actor { msg: GetAnnouncement, _ctx: &mut xtra::Context, ) -> Option { - self.announcements - .get_key_value(&msg.0) - .map(|(id, (time, nonce_pks))| Announcement { - id: *id, - expected_outcome_time: *time, - nonce_pks: nonce_pks.clone(), - }) + let announcement = + self.announcements + .get_key_value(&msg.0) + .map(|(id, (time, nonce_pks))| Announcement { + id: *id, + expected_outcome_time: *time, + nonce_pks: nonce_pks.clone(), + }); + + if announcement.is_none() { + self.pending_announcements.insert(msg.0); + } + + announcement } }