feat: Make blockfetch observer mutable (#86)
This commit is contained in:
parent
07169cc45a
commit
86a2bcc9ac
2 changed files with 4 additions and 4 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue