Skip to content

Commit

Permalink
wip: more but may be too many
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharding committed May 15, 2023
1 parent a27abb2 commit 876cfcb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/descriptor/checksum.rs
Expand Up @@ -73,6 +73,7 @@ pub(super) fn verify_checksum(s: &str) -> Result<&str, Error> {
}

/// An engine to compute a checksum from a string
#[derive(Hash)]
pub struct Engine {
c: u64,
cls: u64,
Expand Down
2 changes: 1 addition & 1 deletion src/descriptor/tr.rs
Expand Up @@ -391,7 +391,7 @@ impl<Pk: MiniscriptKey + ToPublicKey> Tr<Pk> {
/// D E
/// would yield (2, A), (2, B), (2,C), (3, D), (3, E).
///
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Hash)]
pub struct TapTreeIter<'a, Pk: MiniscriptKey> {
stack: Vec<(u8, &'a TapTree<Pk>)>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/miniscript/analyzable.rs
Expand Up @@ -25,7 +25,7 @@ use crate::{Miniscript, MiniscriptKey, ScriptContext, Terminal};
/// guarantees are not satisfied.
/// 4. It has repeated public keys
/// 5. raw pkh fragments without the pk. This could be obtained when parsing miniscript from script
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default)]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]
pub struct ExtParams {
/// Allow parsing of non-safe miniscripts
pub top_unsafe: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/miniscript/decode.rs
Expand Up @@ -213,7 +213,7 @@ macro_rules! match_token {
}

///Vec representing terminals stack while decoding.
#[derive(Debug)]
#[derive(Debug, Hash)]
struct TerminalStack<Pk: MiniscriptKey, Ctx: ScriptContext>(Vec<Miniscript<Pk, Ctx>>);

impl<Pk: MiniscriptKey, Ctx: ScriptContext> TerminalStack<Pk, Ctx> {
Expand Down
1 change: 1 addition & 0 deletions src/miniscript/iter.rs
Expand Up @@ -109,6 +109,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Miniscript<Pk, Ctx> {

/// Iterator for traversing all [Miniscript] miniscript AST references starting from some specific
/// node which constructs the iterator via [Miniscript::iter] method.
#[derive(Hash)]
pub struct Iter<'a, Pk: MiniscriptKey, Ctx: ScriptContext> {
next: Option<&'a Miniscript<Pk, Ctx>>,
// Here we store vec of path elements, where each element is a tuple, consisting of:
Expand Down

0 comments on commit 876cfcb

Please sign in to comment.