Skip to content

Commit

Permalink
Removed tx_root if block num is over 422250
Browse files Browse the repository at this point in the history
  • Loading branch information
chamorin committed Apr 4, 2024
1 parent 4ee6935 commit 09f3369
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "thegarii"
authors = ['[email protected]']
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'
Expand Down
6 changes: 5 additions & 1 deletion src/polling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Polling {
/// Firehose log to stdout
///
/// FIRE BLOCK <BLOCK_NUM> <BLOCK_HASH> <PARENT_NUM> <PARENT_HASH> <LIB> <TIMESTAMP> <ENCODED>
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))?;
Expand All @@ -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 {
"<trimmed>".to_string()
Expand Down

0 comments on commit 09f3369

Please sign in to comment.