You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AbsLockTime: move to module, consolidate error checking
We have the type `AbsLockTime` whose purpose is to provide an ordering
for locktimes. This type is converted from strings and script values,
but we don't check validity during construction. Instead we have
multiple places where validity is manually checked. Fix this.
Note that this is an API-breaking change for people who are manually
constructing policies and Miniscripts since it removes a few ways to
unconditionally convert u32s into locktimes.
/// At least two BIP389 key expressions in the descriptor contain tuples of
502
504
/// derivation indexes of different lengths.
503
505
MultipathDescLenMismatch,
506
+
/// Invalid absolute locktime
507
+
AbsoluteLockTime(AbsLockTimeError),
504
508
}
505
509
506
510
// https://github.com/sipa/miniscript/pull/5 for discussion on this number
@@ -576,6 +580,7 @@ impl fmt::Display for Error {
576
580
Error::TrNoScriptCode => write!(f,"No script code for Tr descriptors"),
577
581
Error::TrNoExplicitScript => write!(f,"No script code for Tr descriptors"),
578
582
Error::MultipathDescLenMismatch => write!(f,"At least two BIP389 key expressions in the descriptor contain tuples of derivation indexes of different lengths"),
0 commit comments