Fiter PDU's before main incoming PDU loop

This commit is contained in:
Devin Ragotzy 2021-02-01 17:02:56 -05:00
parent 64374b4679
commit 591769d5f3
2 changed files with 66 additions and 48 deletions

View file

@ -466,16 +466,7 @@ impl Rooms {
/// Returns true if the event_id was previously inserted.
pub fn append_pdu_outlier(&self, pdu: &PduEvent) -> Result<bool> {
log::info!(
"Number of outlier pdu's {:#?}",
self.eventid_outlierpdu
.iter()
.map(|pair| {
let (_k, v) = pair.unwrap();
serde_json::from_slice::<PduBuilder>(&v).unwrap()
})
.collect::<Vec<_>>()
);
log::info!("Number of outlier pdu's {}", self.eventid_outlierpdu.len());
let mut key = pdu.room_id().as_bytes().to_vec();
key.push(0xff);