From f3833c9fc46d77fddaa7a23ef1d53ba9d860182a Mon Sep 17 00:00:00 2001 From: Brian Pearce Date: Wed, 7 Jun 2023 14:15:53 +0200 Subject: [PATCH] fix: use mined at timestamp in fauxconfirmation (#5443) Description --- We were passing 0 every time when we should have been using the mined at timestamp. Motivation and Context --- Once unconfirmed one sided transactions had been confirmed we were dropping the proper mined at timestamp. How Has This Been Tested? --- Locally with one sided, and one sided stealth transactions between local wallets on igor. What process can a PR reviewer use to test or verify this change? --- Receive a one sided TX, and validate the mined at timestamp is present once confirmed. Closes: #5167 Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify --- .../transaction_service/tasks/check_faux_transaction_status.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base_layer/wallet/src/transaction_service/tasks/check_faux_transaction_status.rs b/base_layer/wallet/src/transaction_service/tasks/check_faux_transaction_status.rs index 17542e8595..41ed276bc6 100644 --- a/base_layer/wallet/src/transaction_service/tasks/check_faux_transaction_status.rs +++ b/base_layer/wallet/src/transaction_service/tasks/check_faux_transaction_status.rs @@ -138,7 +138,8 @@ pub async fn check_faux_transactions( tx.tx_id, mined_height, mined_in_block, - 0, + tx.mined_timestamp + .map_or(0, |mined_timestamp| mined_timestamp.timestamp() as u64), num_confirmations, is_confirmed, is_valid,