Cleanup removing debug printing and logging, append non state events

This commit is contained in:
Devin Ragotzy 2020-12-04 17:16:29 -05:00 committed by Timo Kösters
parent c173ce43a5
commit b869aab5d0
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
6 changed files with 119 additions and 130 deletions

View file

@ -41,7 +41,7 @@ pub type StateHashId = IVec;
///
/// An events parent is any event we are aware of that is part of
/// the events `prev_events` array.
pub enum ClosestParent {
pub(crate) enum ClosestParent {
Append,
Insert(u64),
}
@ -417,7 +417,7 @@ impl Rooms {
/// First we check if the last PDU inserted to the given room is a parent
/// if not we recursively check older `prev_events` to insert the incoming
/// event after.
pub fn get_closest_parent(
pub(crate) fn get_latest_pduid_before(
&self,
room: &RoomId,
incoming_prev_ids: &[EventId],

View file

@ -2,7 +2,7 @@ use std::{collections::HashMap, convert::TryFrom, time::SystemTime};
use crate::{server_server, utils, Error, PduEvent, Result};
use federation::transactions::send_transaction_message;
use log::{debug, error};
use log::{debug, warn};
use rocket::futures::stream::{FuturesUnordered, StreamExt};
use ruma::{api::federation, ServerName};
use sled::IVec;
@ -116,7 +116,7 @@ impl Sending {
}
}
Err((server, e)) => {
error!("server: {}\nerror: {}", server, e)
warn!("Couldn't send transaction to {}: {}", server, e)
// TODO: exponential backoff
}
};