Skip to content

Commit 161978e

Browse files
committed
Use inner_script instead of spk
Inside the `Sh::inner_script` method we call through to underlying methods for the respective enum variant. Currently we are using `spk`, we can instead use `inner_script` (which calls `spk`), this makes the code read more easily.
1 parent b300f4a commit 161978e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/descriptor/sh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl<Pk: MiniscriptKey + ToPublicKey> Sh<Pk> {
243243
pub fn inner_script(&self) -> Script {
244244
match self.inner {
245245
ShInner::Wsh(ref wsh) => wsh.inner_script(),
246-
ShInner::Wpkh(ref wpkh) => wpkh.spk(),
246+
ShInner::Wpkh(ref wpkh) => wpkh.inner_script(),
247247
ShInner::SortedMulti(ref smv) => smv.encode(),
248248
ShInner::Ms(ref ms) => ms.encode(),
249249
}

0 commit comments

Comments
 (0)