From 8a24fc39a61633fb774f806cd3a194e5d5a7788b Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 27 May 2023 04:13:40 -0400 Subject: [PATCH] Only scan v2 Monero TXs --- coins/monero/src/wallet/scan.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coins/monero/src/wallet/scan.rs b/coins/monero/src/wallet/scan.rs index 9ae046ab..e4ad9dfb 100644 --- a/coins/monero/src/wallet/scan.rs +++ b/coins/monero/src/wallet/scan.rs @@ -282,6 +282,11 @@ impl Timelocked { impl Scanner { /// Scan a transaction to discover the received outputs. pub fn scan_transaction(&mut self, tx: &Transaction) -> Timelocked { + // Only scan RCT TXs since we can only spend RCT outputs + if tx.version != 2 { + return Timelocked(tx.prefix.timelock, vec![]); + } + let extra = Extra::read::<&[u8]>(&mut tx.prefix.extra.as_ref()); let extra = if let Ok(extra) = extra { extra