mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Merge bitcoin/bitcoin#33116: refactor: Convert uint256 to Txid
de0675f9derefactor: Move `transaction_identifier.h` to primitives (marcofleon)6f068f65deRemove implicit uint256 conversion and comparison (marcofleon)9c24cda72erefactor: Convert remaining instances from uint256 to Txid (marcofleon)d2ecd6815dpolicy, refactor: Convert uint256 to Txid (marcofleon)f6c0d1d231mempool, refactor: Convert uint256 to Txid (marcofleon)aeb0f78330refactor: Convert `mini_miner` from uint256 to Txid (marcofleon)326f244724refactor: Convert RPCs and `merkleblock` from uint256 to Txid (marcofleon)49b3d3a92aClean up `FindTxForGetData` (marcofleon) Pull request description: This is the final leg of the [type safety refactor](https://github.com/bitcoin/bitcoin/pull/32189). All of these changes are straightforward `uint256` --> `Txid` along with any necessary explicit conversions. Also, `transaction_identifier.h` is moved to primitives in the last commit, as `Txid` and `Wtxid` become fundamental types after this PR. ACKs for top commit: stickies-v: re-ACKde0675f9de, no changes since a20724d926d5844168c6a13fa8293df8c8927efe except address review nits. janb84: re ACKde0675f9dedergoegge: re-ACKde0675f9detheStack: Code-review ACKde0675f9deTree-SHA512: 2413160fca7ab146a8d79d18ce3afcf7384cacc73c513d41928904aa453b4dd7a350064cee71e9c5d015da5904c7c81ac17603e50a47441ebc5b0c653235dd08
This commit is contained in:
@@ -303,7 +303,7 @@ void Chainstate::MaybeUpdateMempoolForReorg(
|
||||
|
||||
AssertLockHeld(cs_main);
|
||||
AssertLockHeld(m_mempool->cs);
|
||||
std::vector<uint256> vHashUpdate;
|
||||
std::vector<Txid> vHashUpdate;
|
||||
{
|
||||
// disconnectpool is ordered so that the front is the most recently-confirmed
|
||||
// transaction (the last tx of the block at the tip) in the disconnected chain.
|
||||
@@ -1088,7 +1088,7 @@ bool MemPoolAccept::ReplacementChecks(Workspace& ws)
|
||||
AssertLockHeld(m_pool.cs);
|
||||
|
||||
const CTransaction& tx = *ws.m_ptx;
|
||||
const uint256& hash = ws.m_hash;
|
||||
const Txid& hash = ws.m_hash;
|
||||
TxValidationState& state = ws.m_state;
|
||||
|
||||
CFeeRate newFeeRate(ws.m_modified_fees, ws.m_vsize);
|
||||
@@ -1270,7 +1270,7 @@ bool MemPoolAccept::ConsensusScriptChecks(const ATMPArgs& args, Workspace& ws)
|
||||
AssertLockHeld(cs_main);
|
||||
AssertLockHeld(m_pool.cs);
|
||||
const CTransaction& tx = *ws.m_ptx;
|
||||
const uint256& hash = ws.m_hash;
|
||||
const Txid& hash = ws.m_hash;
|
||||
TxValidationState& state = ws.m_state;
|
||||
|
||||
// Check again against the current block tip's script verification
|
||||
@@ -1317,7 +1317,7 @@ void MemPoolAccept::FinalizeSubpackage(const ATMPArgs& args)
|
||||
const bool replaced_with_tx{m_subpackage.m_changeset->GetTxCount() == 1};
|
||||
if (replaced_with_tx) {
|
||||
const CTransaction& tx = m_subpackage.m_changeset->GetAddedTxn(0);
|
||||
tx_or_package_hash = tx.GetHash();
|
||||
tx_or_package_hash = tx.GetHash().ToUint256();
|
||||
log_string += strprintf("New tx %s (wtxid=%s, fees=%s, vsize=%s)",
|
||||
tx.GetHash().ToString(),
|
||||
tx.GetWitnessHash().ToString(),
|
||||
|
||||
Reference in New Issue
Block a user