Skip to content

Commit 31810ae

Browse files
committed
Added psbt satisfy for after/older
1 parent 78a56be commit 31810ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/psbt/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ impl<'psbt, Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for PsbtInputSatisfie
234234
None
235235
}
236236
}
237+
238+
fn check_after(&self, n: u32) -> bool {
239+
let cltv = self.psbt.global.unsigned_tx.lock_time;
240+
n <= cltv
241+
}
242+
243+
fn check_older(&self, n: u32) -> bool {
244+
let csv = self.psbt.global.unsigned_tx.input[self.index].sequence;
245+
n <= csv
246+
}
237247
}
238248

239249
fn sanity_check(psbt: &Psbt) -> Result<(), Error> {

0 commit comments

Comments
 (0)