mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Only scan v2 Monero TXs
This commit is contained in:
parent
40b2920412
commit
8a24fc39a6
1 changed files with 5 additions and 0 deletions
|
@ -282,6 +282,11 @@ impl<O: Clone + Zeroize> Timelocked<O> {
|
|||
impl Scanner {
|
||||
/// Scan a transaction to discover the received outputs.
|
||||
pub fn scan_transaction(&mut self, tx: &Transaction) -> Timelocked<ReceivedOutput> {
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue