diff --git a/base_layer/wallet/src/transaction_service/service.rs b/base_layer/wallet/src/transaction_service/service.rs index c5fbb892d2..ac7a88f872 100644 --- a/base_layer/wallet/src/transaction_service/service.rs +++ b/base_layer/wallet/src/transaction_service/service.rs @@ -1217,8 +1217,18 @@ where traced_message_tag ); + // Check if this transaction has already been received and cancelled. + if let Ok(inbound_tx) = self.db.get_cancelled_pending_inbound_transaction(data.tx_id).await { + trace!( + target: LOG_TARGET, + "A repeated Transaction (TxId: {}) has been received but has been previously cancelled", + inbound_tx.tx_id + ); + return Ok(()); + } + // Check if this transaction has already been received. - if let Ok(inbound_tx) = self.db.get_pending_inbound_transaction(data.tx_id).await { + if let Ok(inbound_tx) = self.db.get_pending_inbound_transaction(data.clone().tx_id).await { // Check that it is from the same person if inbound_tx.source_public_key != source_pubkey { return Err(TransactionServiceError::InvalidSourcePublicKey);