Merge bitcoin/bitcoin#32238: qt, wallet: Convert uint256 to Txid

0671d66a8e wallet, refactor: Convert uint256 to Txid in wallet (marcofleon)
c8ed51e62b wallet, refactor: Convert uint256 to Txid in wallet interfaces (marcofleon)
b3214cefe6 qt, refactor: Convert uint256 to Txid in the GUI (marcofleon)

Pull request description:

  This is part of https://github.com/bitcoin/bitcoin/pull/32189.

  Converts all instances of transactions from `uint256` to `Txid` in the wallet, GUI, and related interfaces.

ACKs for top commit:
  stickies-v:
    re-ACK 0671d66a8e, no changes since 65fcfbb2b38bef20a58daa6c828c51890180611d except rebase.
  achow101:
    ACK 0671d66a8e
  furszy:
    Code review ACK 0671d66a8e

Tree-SHA512: 9fd4675db63195c4eed2d14c25015a1821fb597f51404674e4879a44a9cf18f475021a97c5f62f3926b7783ade5a38567386f663acba9f5861f1f59c1309ed60
This commit is contained in:
merge-script
2025-05-16 08:54:45 +01:00
28 changed files with 155 additions and 150 deletions

View File

@@ -14,6 +14,7 @@
#include <support/allocators/secure.h>
#include <util/fs.h>
#include <util/result.h>
#include <util/transaction_identifier.h>
#include <util/ui_change_type.h>
#include <cstdint>
@@ -156,16 +157,16 @@ public:
WalletOrderForm order_form) = 0;
//! Return whether transaction can be abandoned.
virtual bool transactionCanBeAbandoned(const uint256& txid) = 0;
virtual bool transactionCanBeAbandoned(const Txid& txid) = 0;
//! Abandon transaction.
virtual bool abandonTransaction(const uint256& txid) = 0;
virtual bool abandonTransaction(const Txid& txid) = 0;
//! Return whether transaction can be bumped.
virtual bool transactionCanBeBumped(const uint256& txid) = 0;
virtual bool transactionCanBeBumped(const Txid& txid) = 0;
//! Create bump transaction.
virtual bool createBumpTransaction(const uint256& txid,
virtual bool createBumpTransaction(const Txid& txid,
const wallet::CCoinControl& coin_control,
std::vector<bilingual_str>& errors,
CAmount& old_fee,
@@ -176,28 +177,28 @@ public:
virtual bool signBumpTransaction(CMutableTransaction& mtx) = 0;
//! Commit bump transaction.
virtual bool commitBumpTransaction(const uint256& txid,
virtual bool commitBumpTransaction(const Txid& txid,
CMutableTransaction&& mtx,
std::vector<bilingual_str>& errors,
uint256& bumped_txid) = 0;
Txid& bumped_txid) = 0;
//! Get a transaction.
virtual CTransactionRef getTx(const uint256& txid) = 0;
virtual CTransactionRef getTx(const Txid& txid) = 0;
//! Get transaction information.
virtual WalletTx getWalletTx(const uint256& txid) = 0;
virtual WalletTx getWalletTx(const Txid& txid) = 0;
//! Get list of all wallet transactions.
virtual std::set<WalletTx> getWalletTxs() = 0;
//! Try to get updated status for a particular transaction, if possible without blocking.
virtual bool tryGetTxStatus(const uint256& txid,
virtual bool tryGetTxStatus(const Txid& txid,
WalletTxStatus& tx_status,
int& num_blocks,
int64_t& block_time) = 0;
//! Get transaction details.
virtual WalletTx getWalletTxDetails(const uint256& txid,
virtual WalletTx getWalletTxDetails(const Txid& txid,
WalletTxStatus& tx_status,
WalletOrderForm& order_form,
bool& in_mempool,
@@ -300,7 +301,7 @@ public:
virtual std::unique_ptr<Handler> handleAddressBookChanged(AddressBookChangedFn fn) = 0;
//! Register handler for transaction changed messages.
using TransactionChangedFn = std::function<void(const uint256& txid, ChangeType status)>;
using TransactionChangedFn = std::function<void(const Txid& txid, ChangeType status)>;
virtual std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn) = 0;
//! Register handler for keypool changed messages.