From 63c20d73f02edd69ccdaacb56a82224aa421113d Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:00:13 -0700 Subject: [PATCH] Fix block desrialization --- snarkos/network/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snarkos/network/mod.rs b/snarkos/network/mod.rs index 882ba12154..ce1c17413f 100644 --- a/snarkos/network/mod.rs +++ b/snarkos/network/mod.rs @@ -237,9 +237,9 @@ pub async fn handle_listener(listener: TcpListener, ledger: Arc(leader_ip: &SocketAddr) -> Result> { let ip = leader_ip.ip(); - let bytes = reqwest::get(format!("http://{ip}/testnet3/block/0")).await?.bytes().await?; + let block_string = reqwest::get(format!("http://{ip}/testnet3/block/0")).await?.text().await?; - Block::from_bytes_le(&bytes) + Block::from_str(&block_string) } /// Send a ping to all peers every 10 seconds.