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

@@ -291,17 +291,17 @@ public:
LOCK(m_wallet->cs_wallet);
m_wallet->CommitTransaction(std::move(tx), std::move(value_map), std::move(order_form));
}
bool transactionCanBeAbandoned(const uint256& txid) override { return m_wallet->TransactionCanBeAbandoned(txid); }
bool abandonTransaction(const uint256& txid) override
bool transactionCanBeAbandoned(const Txid& txid) override { return m_wallet->TransactionCanBeAbandoned(txid); }
bool abandonTransaction(const Txid& txid) override
{
LOCK(m_wallet->cs_wallet);
return m_wallet->AbandonTransaction(txid);
}
bool transactionCanBeBumped(const uint256& txid) override
bool transactionCanBeBumped(const Txid& txid) override
{
return feebumper::TransactionCanBeBumped(*m_wallet.get(), txid);
}
bool createBumpTransaction(const uint256& txid,
bool createBumpTransaction(const Txid& txid,
const CCoinControl& coin_control,
std::vector<bilingual_str>& errors,
CAmount& old_fee,
@@ -312,15 +312,15 @@ public:
return feebumper::CreateRateBumpTransaction(*m_wallet.get(), txid, coin_control, errors, old_fee, new_fee, mtx, /* require_mine= */ true, outputs) == feebumper::Result::OK;
}
bool signBumpTransaction(CMutableTransaction& mtx) override { return feebumper::SignTransaction(*m_wallet.get(), mtx); }
bool commitBumpTransaction(const uint256& txid,
bool commitBumpTransaction(const Txid& txid,
CMutableTransaction&& mtx,
std::vector<bilingual_str>& errors,
uint256& bumped_txid) override
Txid& bumped_txid) override
{
return feebumper::CommitTransaction(*m_wallet.get(), txid, std::move(mtx), errors, bumped_txid) ==
feebumper::Result::OK;
}
CTransactionRef getTx(const uint256& txid) override
CTransactionRef getTx(const Txid& txid) override
{
LOCK(m_wallet->cs_wallet);
auto mi = m_wallet->mapWallet.find(txid);
@@ -329,7 +329,7 @@ public:
}
return {};
}
WalletTx getWalletTx(const uint256& txid) override
WalletTx getWalletTx(const Txid& txid) override
{
LOCK(m_wallet->cs_wallet);
auto mi = m_wallet->mapWallet.find(txid);
@@ -347,7 +347,7 @@ public:
}
return result;
}
bool tryGetTxStatus(const uint256& txid,
bool tryGetTxStatus(const Txid& txid,
interfaces::WalletTxStatus& tx_status,
int& num_blocks,
int64_t& block_time) override
@@ -366,7 +366,7 @@ public:
tx_status = MakeWalletTxStatus(*m_wallet, mi->second);
return true;
}
WalletTx getWalletTxDetails(const uint256& txid,
WalletTx getWalletTxDetails(const Txid& txid,
WalletTxStatus& tx_status,
WalletOrderForm& order_form,
bool& in_mempool,
@@ -533,7 +533,7 @@ public:
std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn) override
{
return MakeSignalHandler(m_wallet->NotifyTransactionChanged.connect(
[fn](const uint256& txid, ChangeType status) { fn(txid, status); }));
[fn](const Txid& txid, ChangeType status) { fn(txid, status); }));
}
std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) override
{