fn sync_to_disk(&mut self) -> std::io::Result<()> {
        let json = serde_json::to_string(&self.consensus_state)?;

        AtomicFile::new(&self.state_file_path, OverwriteBehavior::AllowOverwrite)
            .write(|f| f.write_all(json.as_bytes()))?;

        Ok(())
    }
/// Sync the current state to disk
Sync the current state to disk
Sync the current state to disk
fn sync_to_disk(&mut self) -> std::io::Result<()> {
        let json = serde_json::to_string(&self.consensus_state)?;
        AtomicFile::new(&self.state_file_path, OverwriteBehavior::AllowOverwrite)
            .write(|f| f.write_all(json.as_bytes()))?;
        Ok(())
    }
fn sync_to_disk ( & mut self ) -> std :: io :: Result < ( ) > { let json = serde_json :: to_string ( & self . consensus_state ) ? ; AtomicFile :: new ( & self . state_file_path , OverwriteBehavior :: AllowOverwrite ) . write ( | f | f . write_all ( json . as_bytes ( ) ) ) ? ; Ok ( ( ) ) }
Sync the current state to disk
Sync the current state to disk
&mut self