@@ -14,8 +14,6 @@ use core::fmt;
14
14
#[ cfg( feature = "std" ) ]
15
15
use std:: error;
16
16
17
- use bitcoin:: Sequence ;
18
-
19
17
pub use self :: correctness:: { Base , Correctness , Input } ;
20
18
pub use self :: extra_props:: ExtData ;
21
19
pub use self :: malleability:: { Dissat , Malleability } ;
@@ -25,8 +23,6 @@ use crate::{MiniscriptKey, Terminal};
25
23
/// Detailed type of a typechecker error
26
24
#[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
27
25
pub enum ErrorKind {
28
- /// Relative or absolute timelock had an invalid time value (either 0, or >=0x80000000)
29
- InvalidTime ,
30
26
/// Passed a `z` argument to a `d` wrapper when `z` was expected
31
27
NonZeroDupIf ,
32
28
/// Multisignature or threshold policy had a `k` value of 0
@@ -79,11 +75,6 @@ pub struct Error {
79
75
impl fmt:: Display for Error {
80
76
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
81
77
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
- ) ,
87
78
ErrorKind :: NonZeroDupIf => write ! (
88
79
f,
89
80
"fragment «{}» represents needs to be `z`, needs to consume zero elements from the stack" ,
@@ -479,15 +470,7 @@ impl Type {
479
470
}
480
471
}
481
472
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 ( ) ) ,
491
474
Terminal :: Sha256 ( ..) => Ok ( Self :: hash ( ) ) ,
492
475
Terminal :: Hash256 ( ..) => Ok ( Self :: hash ( ) ) ,
493
476
Terminal :: Ripemd160 ( ..) => Ok ( Self :: hash ( ) ) ,
0 commit comments