// Returns the states checkpointed since the last time process_changes was
// called.
Returns the states checkpointed since the last time process_changes was
called.
Returns the states checkpointed since the last time process_changes was called .
fn process_changes(
        &self,
        _time_source: &dyn TimeSource,
        _artifacts: Vec<UnvalidatedArtifact<StateSyncMessage>>,
    ) -> (Vec<Advert<StateSyncArtifact>>, ProcessingResult) {
        let filter = StateSyncFilter {
            height: self.states.read().last_advertised,
        };
        let artifacts = self.get_all_validated_by_filter(&filter);
        if let Some(artifact) = artifacts.last() {
            self.states.write().last_advertised = artifact.attribute.height;
        }
        (artifacts, ProcessingResult::StateUnchanged)
    }
fn process_changes ( & self , _time_source : & dyn TimeSource , _artifacts : Vec < UnvalidatedArtifact < StateSyncMessage > > , ) -> ( Vec < Advert < StateSyncArtifact > > , ProcessingResult ) { let filter = StateSyncFilter { height : self . states . read ( ) . last_advertised , } ; let artifacts = self . get_all_validated_by_filter ( & filter ) ; if let Some ( artifact ) = artifacts . last ( ) { self . states . write ( ) . last_advertised = artifact . attribute . height ; } ( artifacts , ProcessingResult :: StateUnchanged ) }
Returns the states checkpointed since the last time process_changes was
called.
Returns the states checkpointed since the last time process_changes was called .
&self
_time_source
&dyn TimeSource
_artifacts
Vec<UnvalidatedArtifact<StateSyncMessage>>