From fa8535cfd78df790bc6328b6aa78dabe5a2cb04e Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Thu, 13 Jun 2024 00:00:00 +0000 Subject: [PATCH] =?UTF-8?q?pindexer:=20=E2=9C=A8=20add=20`IndexerExt`=20ex?= =?UTF-8?q?tension=20trait?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/bin/pindexer/src/indexer_ext.rs | 9 +++++++++ crates/bin/pindexer/src/lib.rs | 1 + 2 files changed, 10 insertions(+) create mode 100644 crates/bin/pindexer/src/indexer_ext.rs diff --git a/crates/bin/pindexer/src/indexer_ext.rs b/crates/bin/pindexer/src/indexer_ext.rs new file mode 100644 index 0000000000..380eeca5f9 --- /dev/null +++ b/crates/bin/pindexer/src/indexer_ext.rs @@ -0,0 +1,9 @@ +pub trait IndexerExt: Sized { + fn with_default_penumbra_app_views(self) -> Self; +} + +impl IndexerExt for cometindex::Indexer { + fn with_default_penumbra_app_views(self) -> Self { + self.with_index(crate::shielded_pool::fmd::ClueSet {}) + } +} diff --git a/crates/bin/pindexer/src/lib.rs b/crates/bin/pindexer/src/lib.rs index fb66be36dc..d174c59f5e 100644 --- a/crates/bin/pindexer/src/lib.rs +++ b/crates/bin/pindexer/src/lib.rs @@ -1,3 +1,4 @@ pub use cometindex::{AppView, Indexer}; +mod indexer_ext; pub mod shielded_pool;