Skip to content

Commit c128e79

Browse files
authored
fix: zero sequence check on relative time
1 parent 1a3605d commit c128e79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/primitives/relative_locktime.rs

Lines changed: 1 addition & 1 deletion
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)