From 09f33696e804741d2a6e9c4ff339efe9e3707453 Mon Sep 17 00:00:00 2001 From: Charles Morin Date: Thu, 4 Apr 2024 11:28:42 -0400 Subject: [PATCH] Removed tx_root if block num is over 422250 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/polling.rs | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0406f1b..36ddef8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "thegarii" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 3dfd1b1..52c8ff1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "thegarii" authors = ['info@chainsafe.io'] description = 'thegarii firehose service' -version = "0.1.0" +version = "0.1.1" license = "GPL-3.0" homepage = 'https://github.com/ChainSafe/the-garii' repository = 'https://github.com/ChainSafe/the-garii' diff --git a/src/polling.rs b/src/polling.rs index 0a6d747..08e005f 100644 --- a/src/polling.rs +++ b/src/polling.rs @@ -150,7 +150,7 @@ impl Polling { /// Firehose log to stdout /// /// FIRE BLOCK - fn firehose_log(&self, b: FirehoseBlock) -> Result<()> { + fn firehose_log(&self, mut b: FirehoseBlock) -> Result<()> { let block_num = b.height; let block_hash = base64_url::decode(&b.indep_hash) .with_context(|| format!("invalid base64url indep_hash on block {}", block_num))?; @@ -170,6 +170,10 @@ impl Polling { 0 }; + if block_num < 422250 { + b.tx_root = None; + } + let encoded: Block = b.try_into()?; let block_payload = if self.quiet { "".to_string()