From 0bf3b9f44152de5c866db36c8c48086b8ed35728 Mon Sep 17 00:00:00 2001 From: selsta Date: Tue, 28 Apr 2026 15:25:38 +0200 Subject: [PATCH] wallet2: ensure daemon returns correct tx for spend proof (cherry picked from commit 04eeb3ba1fc2ed0239eb10e885136d86b7e98ad0) --- src/wallet/wallet2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 7ce06e8ff..63fa3679b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12617,6 +12617,7 @@ std::string wallet2::get_spend_proof(const crypto::hash &txid, const std::string cryptonote::transaction tx; crypto::hash tx_hash; THROW_WALLET_EXCEPTION_IF(!get_pruned_tx(res.txs[0], tx, tx_hash), error::wallet_internal_error, "Failed to get tx from daemon"); + THROW_WALLET_EXCEPTION_IF(tx_hash != txid, error::wallet_internal_error, "Failed to get the right transaction from daemon"); std::vector> signatures; @@ -12738,6 +12739,7 @@ bool wallet2::check_spend_proof(const crypto::hash &txid, const std::string &mes cryptonote::transaction tx; crypto::hash tx_hash; THROW_WALLET_EXCEPTION_IF(!get_pruned_tx(res.txs[0], tx, tx_hash), error::wallet_internal_error, "failed to get tx from daemon"); + THROW_WALLET_EXCEPTION_IF(tx_hash != txid, error::wallet_internal_error, "Failed to get the right transaction from daemon"); // check signature size size_t num_sigs = 0;