From 81aeaba48a980a7e7add76ac2d24e896bedaa1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Sat, 13 Jan 2024 18:33:01 +0800 Subject: [PATCH] feat(chain): add `SpkIterator::descriptor` method Otherwise there will be no way to view the descriptor of the `SpkIterator`. --- crates/chain/src/spk_iter.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/chain/src/spk_iter.rs b/crates/chain/src/spk_iter.rs index a28944f1..2772dcf7 100644 --- a/crates/chain/src/spk_iter.rs +++ b/crates/chain/src/spk_iter.rs @@ -87,6 +87,11 @@ where secp: Secp256k1::verification_only(), } } + + /// Get a reference to the internal descriptor. + pub fn descriptor(&self) -> &D { + &self.descriptor + } } impl Iterator for SpkIterator