mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
cleanup
This commit is contained in:
parent
8b81e3a03d
commit
b766312108
@ -160,8 +160,10 @@ pub fn process_new_event(
|
||||
}
|
||||
|
||||
// Save event
|
||||
// Bail if the event is an already-replaced replaceable event
|
||||
if event.kind.is_replaceable() && !global_feed {
|
||||
if global_feed {
|
||||
GLOBALS.db().write_event_volatile(event.to_owned());
|
||||
} else if event.kind.is_replaceable() {
|
||||
// Bail if the event is an already-replaced replaceable event
|
||||
if !GLOBALS.db().replace_event(event, None)? {
|
||||
tracing::trace!(
|
||||
"{}: Old Event: {} {:?} @{}",
|
||||
@ -172,8 +174,6 @@ pub fn process_new_event(
|
||||
);
|
||||
return Ok(()); // This did not replace anything.
|
||||
}
|
||||
} else if global_feed {
|
||||
GLOBALS.db().write_event_volatile(event.to_owned());
|
||||
} else {
|
||||
// This will ignore if it is already there
|
||||
GLOBALS.db().write_event(event, None)?;
|
||||
|
Loading…
Reference in New Issue
Block a user