@@ -14,8 +14,6 @@ use core::fmt;
1414#[ cfg( feature = "std" ) ]
1515use std:: error;
1616
17- use bitcoin:: Sequence ;
18-
1917pub use self :: correctness:: { Base , Correctness , Input } ;
2018pub use self :: extra_props:: ExtData ;
2119pub use self :: malleability:: { Dissat , Malleability } ;
@@ -25,8 +23,6 @@ use crate::{MiniscriptKey, Terminal};
2523/// Detailed type of a typechecker error
2624#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
2725pub enum ErrorKind {
28- /// Relative or absolute timelock had an invalid time value (either 0, or >=0x80000000)
29- InvalidTime ,
3026 /// Passed a `z` argument to a `d` wrapper when `z` was expected
3127 NonZeroDupIf ,
3228 /// Multisignature or threshold policy had a `k` value of 0
@@ -79,11 +75,6 @@ pub struct Error {
7975impl fmt:: Display for Error {
8076 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
8177 match self . error {
82- ErrorKind :: InvalidTime => write ! (
83- f,
84- "fragment «{}» represents a timelock which value is invalid (time must be in [1; 0x80000000])" ,
85- self . fragment_string,
86- ) ,
8778 ErrorKind :: NonZeroDupIf => write ! (
8879 f,
8980 "fragment «{}» represents needs to be `z`, needs to consume zero elements from the stack" ,
@@ -479,15 +470,7 @@ impl Type {
479470 }
480471 }
481472 Terminal :: After ( _) => Ok ( Self :: time ( ) ) ,
482- Terminal :: Older ( t) => {
483- if t == Sequence :: ZERO || !t. is_relative_lock_time ( ) {
484- return Err ( Error {
485- fragment_string : fragment. to_string ( ) ,
486- error : ErrorKind :: InvalidTime ,
487- } ) ;
488- }
489- Ok ( Self :: time ( ) )
490- }
473+ Terminal :: Older ( _) => Ok ( Self :: time ( ) ) ,
491474 Terminal :: Sha256 ( ..) => Ok ( Self :: hash ( ) ) ,
492475 Terminal :: Hash256 ( ..) => Ok ( Self :: hash ( ) ) ,
493476 Terminal :: Ripemd160 ( ..) => Ok ( Self :: hash ( ) ) ,
0 commit comments