22module Simplicity.Elements.Programs.TimeLock
33 ( txIsFinal
44 , txLockHeight , txLockTime
5- , txLockDistance , txLockDuration
5+ , brokenTxLockDistance , brokenTxLockDuration
66 , checkLockHeight , checkLockTime
7- , checkLockDistance , checkLockDuration
7+ , brokenCheckLockDistance , brokenCheckLockDuration
88 , module Simplicity.Programs.TimeLock
99 , Bit
1010 ) where
@@ -43,16 +43,16 @@ bip68VersionCheck :: (Core term, Primitive term) => term () Bit
4343bip68VersionCheck = scribe (toWord32 2 ) &&& primitive Version >>> le word32
4444
4545-- | Implements 'Simplicity.Elements.DataTypes.txLockDistance'.
46- txLockDistance :: (Core term , Primitive term ) => term () Distance
47- txLockDistance = bip68VersionCheck &&& zero word16
46+ brokenTxLockDistance :: (Core term , Primitive term ) => term () Distance
47+ brokenTxLockDistance = bip68VersionCheck &&& zero word16
4848 >>> match ih (forWhile word32 body >>> copair iden iden)
4949 where
5050 body = take (drop (primitive InputSequence )) &&& ih
5151 >>> match (injl ih) (injr (take parseSequence &&& ih >>> match ih (match (max word16) ih)))
5252
5353-- | Implements 'Simplicity.Elements.DataTypes.txLockDuration'.
54- txLockDuration :: (Core term , Primitive term ) => term () Duration
55- txLockDuration = bip68VersionCheck &&& zero word16
54+ brokenTxLockDuration :: (Core term , Primitive term ) => term () Duration
55+ brokenTxLockDuration = bip68VersionCheck &&& zero word16
5656 >>> match ih (forWhile word32 body >>> copair iden iden)
5757 where
5858 body = take (drop (primitive InputSequence )) &&& ih
@@ -67,9 +67,9 @@ checkLockTime :: (Assert term, Primitive term) => term Time ()
6767checkLockTime = assert (iden &&& (unit >>> txLockTime) >>> le word32)
6868
6969-- | Asserts that the input is less than or equal to the value returned by 'txLockDistance'.
70- checkLockDistance :: (Assert term , Primitive term ) => term Distance ()
71- checkLockDistance = assert (iden &&& (unit >>> txLockDistance ) >>> le word16)
70+ brokenCheckLockDistance :: (Assert term , Primitive term ) => term Distance ()
71+ brokenCheckLockDistance = assert (iden &&& (unit >>> brokenTxLockDistance ) >>> le word16)
7272
7373-- | Asserts that the input is less than or equal to the value returned by 'txLockDuration'.
74- checkLockDuration :: (Assert term , Primitive term ) => term Duration ()
75- checkLockDuration = assert (iden &&& (unit >>> txLockDuration ) >>> le word16)
74+ brokenCheckLockDuration :: (Assert term , Primitive term ) => term Duration ()
75+ brokenCheckLockDuration = assert (iden &&& (unit >>> brokenTxLockDuration ) >>> le word16)
0 commit comments