From 1890367bfc5cf503a617790ce41d59ceed53ed02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 9 Dec 2024 16:13:02 +0000 Subject: [PATCH] allow conversion from CometBFT block subscription --- common/nyxd-scraper/src/block_processor/types.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/nyxd-scraper/src/block_processor/types.rs b/common/nyxd-scraper/src/block_processor/types.rs index 93ffb3ba76..6909ff32a0 100644 --- a/common/nyxd-scraper/src/block_processor/types.rs +++ b/common/nyxd-scraper/src/block_processor/types.rs @@ -84,13 +84,7 @@ impl TryFrom for BlockToProcess { // TODO: we're losing `result_begin_block` and `result_end_block` here but maybe that's fine? let maybe_block = match event.data { - // we don't care about `NewBlock` until CometBFT 0.38, i.e. until we upgrade to wasmd 0.50 - EventData::NewBlock { .. } => { - return Err(ScraperError::InvalidSubscriptionEvent { - query, - kind: "NewBlock".to_string(), - }) - } + EventData::NewBlock { block, .. } => block, EventData::LegacyNewBlock { block, .. } => block, EventData::Tx { .. } => { return Err(ScraperError::InvalidSubscriptionEvent {