style: apply fmt to entire workspace

This commit is contained in:
Santiago Carmuega 2021-12-09 07:03:13 -03:00
parent 1b6cbbc095
commit 336d2400f4
23 changed files with 111 additions and 67 deletions

View file

@ -1,5 +1,8 @@
use pallas_chainsync::{ClientConsumer, NoopObserver};
use pallas_handshake::{MAINNET_MAGIC, n2c::{Client, VersionTable}};
use pallas_handshake::{
n2c::{Client, VersionTable},
MAINNET_MAGIC,
};
use pallas_machines::primitives::Point;
use pallas_machines::run_agent;
use pallas_multiplexer::Multiplexer;

View file

@ -9,9 +9,20 @@ use pallas_machines::{
use crate::{BlockBody, Message, State, Tip, WrappedHeader};
/// An observer of chain-sync events sent by the state-machine
pub trait Observer<C> where C: Debug {
fn on_block(&self, cursor: &Option<Point>, content: &C) -> Result<(), Box<dyn std::error::Error>> {
log::debug!("asked to save block content {:?} at cursor {:?}", content, cursor);
pub trait Observer<C>
where
C: Debug,
{
fn on_block(
&self,
cursor: &Option<Point>,
content: &C,
) -> Result<(), Box<dyn std::error::Error>> {
log::debug!(
"asked to save block content {:?} at cursor {:?}",
content,
cursor
);
Ok(())
}