Skip to content

Commit 9420012

Browse files
ChrisCho-Hapoelstra
authored andcommitted
fix: zero sequence check on relative time
1 parent 5147c6f commit 9420012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/primitives/relative_locktime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl RelLockTime {
6565
impl convert::TryFrom<Sequence> for RelLockTime {
6666
type Error = RelLockTimeError;
6767
fn try_from(seq: Sequence) -> Result<Self, RelLockTimeError> {
68-
if seq.is_relative_lock_time() {
68+
if seq.is_relative_lock_time() && seq != Sequence::ZERO {
6969
Ok(RelLockTime(seq))
7070
} else {
7171
Err(RelLockTimeError { value: seq.to_consensus_u32() })

0 commit comments

Comments
 (0)