feat: Make blockfetch observer mutable (#86)

This commit is contained in:
Santiago Carmuega 2022-04-08 18:52:38 -03:00 committed by GitHub
parent 07169cc45a
commit 86a2bcc9ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ use std::net::TcpStream;
struct BlockPrinter;
impl Observer for BlockPrinter {
fn on_block_received(&self, body: Vec<u8>) -> Result<(), Box<dyn std::error::Error>> {
fn on_block_received(&mut self, body: Vec<u8>) -> Result<(), Box<dyn std::error::Error>> {
println!("{}", hex::encode(&body));
println!("----------");
Ok(())