Ignore transactions which use a timelock

This commit is contained in:
Luke Parker 2022-06-01 17:14:57 -04:00
parent df2876dbd4
commit 2ae715f899
No known key found for this signature in database
GPG key ID: F9F1386DB1E119B6

View file

@ -58,6 +58,12 @@ impl Transaction {
view: Scalar, view: Scalar,
spend: EdwardsPoint spend: EdwardsPoint
) -> Vec<SpendableOutput> { ) -> Vec<SpendableOutput> {
// Ignore transactions which utilize a timelock. Almost no transactions on Monero do,
// and they're not worth the effort to track given their complexities
if self.prefix.unlock_time != 0 {
return vec![];
}
let mut extra = vec![]; let mut extra = vec![];
write_varint(&u64::try_from(self.prefix.extra.len()).unwrap(), &mut extra).unwrap(); write_varint(&u64::try_from(self.prefix.extra.len()).unwrap(), &mut extra).unwrap();
extra.extend(&self.prefix.extra); extra.extend(&self.prefix.extra);