Skip to content

Commit a60f863

Browse files
committed
scripted-diff: Replace GenTxidVariant with GenTxid
-BEGIN VERIFY SCRIPT- sed -i 's/GenTxidVariant/GenTxid/g' $(git grep -l 'GenTxidVariant') -END VERIFY SCRIPT-
1 parent c8ba199 commit a60f863

14 files changed

+66
-66
lines changed

src/net_processing.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ struct Peer {
302302
* non-wtxid-relay peers, wtxid for wtxid-relay peers). We use the
303303
* mempool to sort transactions in dependency order before relay, so
304304
* this does not have to be sorted. */
305-
std::set<GenTxidVariant> m_tx_inventory_to_send GUARDED_BY(m_tx_inventory_mutex);
305+
std::set<GenTxid> m_tx_inventory_to_send GUARDED_BY(m_tx_inventory_mutex);
306306
/** Whether the peer has requested us to send our complete mempool. Only
307307
* permitted if the peer has NetPermissionFlags::Mempool or we advertise
308308
* NODE_BLOOM. See BIP35. */
@@ -856,7 +856,7 @@ class PeerManagerImpl final : public PeerManager
856856
std::shared_ptr<const CBlock> m_most_recent_block GUARDED_BY(m_most_recent_block_mutex);
857857
std::shared_ptr<const CBlockHeaderAndShortTxIDs> m_most_recent_compact_block GUARDED_BY(m_most_recent_block_mutex);
858858
uint256 m_most_recent_block_hash GUARDED_BY(m_most_recent_block_mutex);
859-
std::unique_ptr<const std::map<GenTxidVariant, CTransactionRef>> m_most_recent_block_txs GUARDED_BY(m_most_recent_block_mutex);
859+
std::unique_ptr<const std::map<GenTxid, CTransactionRef>> m_most_recent_block_txs GUARDED_BY(m_most_recent_block_mutex);
860860

861861
// Data about the low-work headers synchronization, aggregated from all peers' HeadersSyncStates.
862862
/** Mutex guarding the other m_headers_presync_* variables. */
@@ -2027,7 +2027,7 @@ void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::sha
20272027
std::async(std::launch::deferred, [&] { return NetMsg::Make(NetMsgType::CMPCTBLOCK, *pcmpctblock); })};
20282028

20292029
{
2030-
auto most_recent_block_txs = std::make_unique<std::map<GenTxidVariant, CTransactionRef>>();
2030+
auto most_recent_block_txs = std::make_unique<std::map<GenTxid, CTransactionRef>>();
20312031
for (const auto& tx : pblock->vtx) {
20322032
most_recent_block_txs->emplace(tx->GetHash(), tx);
20332033
most_recent_block_txs->emplace(tx->GetWitnessHash(), tx);
@@ -2166,7 +2166,7 @@ void PeerManagerImpl::RelayTransaction(const Txid& txid, const Wtxid& wtxid)
21662166
// in the announcement.
21672167
if (tx_relay->m_next_inv_send_time == 0s) continue;
21682168

2169-
const auto gtxid{peer.m_wtxid_relay ? GenTxidVariant{wtxid} : GenTxidVariant{txid}};
2169+
const auto gtxid{peer.m_wtxid_relay ? GenTxid{wtxid} : GenTxid{txid}};
21702170
if (!tx_relay->m_tx_inventory_known_filter.contains(gtxid.ToUint256())) {
21712171
tx_relay->m_tx_inventory_to_send.insert(gtxid);
21722172
}
@@ -4011,7 +4011,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
40114011
pfrom.fDisconnect = true;
40124012
return;
40134013
}
4014-
const GenTxidVariant gtxid = ToGenTxid(inv);
4014+
const GenTxid gtxid = ToGenTxid(inv);
40154015
AddKnownTx(*peer, inv.hash);
40164016

40174017
if (!m_chainman.IsInitialBlockDownload()) {
@@ -4942,7 +4942,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
49424942
if (msg_type == NetMsgType::NOTFOUND) {
49434943
std::vector<CInv> vInv;
49444944
vRecv >> vInv;
4945-
std::vector<GenTxidVariant> tx_invs;
4945+
std::vector<GenTxid> tx_invs;
49464946
if (vInv.size() <= node::MAX_PEER_TX_ANNOUNCEMENTS + MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
49474947
for (CInv &inv : vInv) {
49484948
if (inv.IsGenTxMsg()) {
@@ -5450,7 +5450,7 @@ class CompareInvMempoolOrder
54505450
public:
54515451
explicit CompareInvMempoolOrder(CTxMemPool* mempool) : m_mempool{mempool} {}
54525452

5453-
bool operator()(std::set<GenTxidVariant>::iterator a, std::set<GenTxidVariant>::iterator b)
5453+
bool operator()(std::set<GenTxid>::iterator a, std::set<GenTxid>::iterator b)
54545454
{
54555455
/* As std::make_heap produces a max-heap, we want the entries with the
54565456
* fewest ancestors/highest fee to sort later. */
@@ -5793,9 +5793,9 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
57935793
// Determine transactions to relay
57945794
if (fSendTrickle) {
57955795
// Produce a vector with all candidates for sending
5796-
std::vector<std::set<GenTxidVariant>::iterator> vInvTx;
5796+
std::vector<std::set<GenTxid>::iterator> vInvTx;
57975797
vInvTx.reserve(tx_relay->m_tx_inventory_to_send.size());
5798-
for (std::set<GenTxidVariant>::iterator it = tx_relay->m_tx_inventory_to_send.begin(); it != tx_relay->m_tx_inventory_to_send.end(); it++) {
5798+
for (std::set<GenTxid>::iterator it = tx_relay->m_tx_inventory_to_send.begin(); it != tx_relay->m_tx_inventory_to_send.end(); it++) {
57995799
vInvTx.push_back(it);
58005800
}
58015801
const CFeeRate filterrate{tx_relay->m_fee_filter_received.load()};
@@ -5812,9 +5812,9 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
58125812
while (!vInvTx.empty() && nRelayedTransactions < broadcast_max) {
58135813
// Fetch the top element from the heap
58145814
std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
5815-
std::set<GenTxidVariant>::iterator it = vInvTx.back();
5815+
std::set<GenTxid>::iterator it = vInvTx.back();
58165816
vInvTx.pop_back();
5817-
GenTxidVariant hash = *it;
5817+
GenTxid hash = *it;
58185818
Assume(peer->m_wtxid_relay == hash.IsWtxid());
58195819
CInv inv(peer->m_wtxid_relay ? MSG_WTX : MSG_TX, hash.ToUint256());
58205820
// Remove it from the to-be-sent set
@@ -5962,7 +5962,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
59625962
//
59635963
{
59645964
LOCK(m_tx_download_mutex);
5965-
for (const GenTxidVariant& gtxid : m_txdownloadman.GetRequestsToSend(pto->GetId(), current_time)) {
5965+
for (const GenTxid& gtxid : m_txdownloadman.GetRequestsToSend(pto->GetId(), current_time)) {
59665966
vGetData.emplace_back(gtxid.IsWtxid() ? MSG_WTX : (MSG_TX | GetFetchFlags(*peer)), gtxid.ToUint256());
59675967
if (vGetData.size() >= MAX_GETDATA_SZ) {
59685968
MakeAndPushMessage(*pto, NetMsgType::GETDATA, vGetData);

src/node/txdownloadman.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class CBlock;
1717
class CRollingBloomFilter;
1818
class CTxMemPool;
19-
class GenTxidVariant;
19+
class GenTxid;
2020
class TxRequestTracker;
2121
namespace node {
2222
class TxDownloadManagerImpl;
@@ -138,13 +138,13 @@ class TxDownloadManager {
138138
/** Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received.
139139
* Also called internally when a transaction is missing parents so that we can request them.
140140
* Returns true if this was a dropped inv (p2p_inv=true and we already have the tx), false otherwise. */
141-
bool AddTxAnnouncement(NodeId peer, const GenTxidVariant& gtxid, std::chrono::microseconds now);
141+
bool AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now);
142142

143143
/** Get getdata requests to send. */
144-
std::vector<GenTxidVariant> GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time);
144+
std::vector<GenTxid> GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time);
145145

146146
/** Should be called when a notfound for a tx has been received. */
147-
void ReceivedNotFound(NodeId nodeid, const std::vector<GenTxidVariant>& gtxids);
147+
void ReceivedNotFound(NodeId nodeid, const std::vector<GenTxid>& gtxids);
148148

149149
/** Respond to successful transaction submission to mempool */
150150
void MempoolAcceptedTx(const CTransactionRef& tx);

src/node/txdownloadman_impl.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ void TxDownloadManager::DisconnectedPeer(NodeId nodeid)
3939
{
4040
m_impl->DisconnectedPeer(nodeid);
4141
}
42-
bool TxDownloadManager::AddTxAnnouncement(NodeId peer, const GenTxidVariant& gtxid, std::chrono::microseconds now)
42+
bool TxDownloadManager::AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now)
4343
{
4444
return m_impl->AddTxAnnouncement(peer, gtxid, now);
4545
}
46-
std::vector<GenTxidVariant> TxDownloadManager::GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
46+
std::vector<GenTxid> TxDownloadManager::GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
4747
{
4848
return m_impl->GetRequestsToSend(nodeid, current_time);
4949
}
50-
void TxDownloadManager::ReceivedNotFound(NodeId nodeid, const std::vector<GenTxidVariant>& gtxids)
50+
void TxDownloadManager::ReceivedNotFound(NodeId nodeid, const std::vector<GenTxid>& gtxids)
5151
{
5252
m_impl->ReceivedNotFound(nodeid, gtxids);
5353
}
@@ -122,7 +122,7 @@ void TxDownloadManagerImpl::BlockDisconnected()
122122
RecentConfirmedTransactionsFilter().reset();
123123
}
124124

125-
bool TxDownloadManagerImpl::AlreadyHaveTx(const GenTxidVariant& gtxid, bool include_reconsiderable)
125+
bool TxDownloadManagerImpl::AlreadyHaveTx(const GenTxid& gtxid, bool include_reconsiderable)
126126
{
127127
const uint256& hash = gtxid.ToUint256();
128128

@@ -167,7 +167,7 @@ void TxDownloadManagerImpl::DisconnectedPeer(NodeId nodeid)
167167

168168
}
169169

170-
bool TxDownloadManagerImpl::AddTxAnnouncement(NodeId peer, const GenTxidVariant& gtxid, std::chrono::microseconds now)
170+
bool TxDownloadManagerImpl::AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now)
171171
{
172172
// If this is an orphan we are trying to resolve, consider this peer as a orphan resolution candidate instead.
173173
// - is wtxid matching something in orphanage
@@ -261,16 +261,16 @@ bool TxDownloadManagerImpl::MaybeAddOrphanResolutionCandidate(const std::vector<
261261
return true;
262262
}
263263

264-
std::vector<GenTxidVariant> TxDownloadManagerImpl::GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
264+
std::vector<GenTxid> TxDownloadManagerImpl::GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time)
265265
{
266-
std::vector<GenTxidVariant> requests;
267-
std::vector<std::pair<NodeId, GenTxidVariant>> expired;
266+
std::vector<GenTxid> requests;
267+
std::vector<std::pair<NodeId, GenTxid>> expired;
268268
auto requestable = m_txrequest.GetRequestable(nodeid, current_time, &expired);
269269
for (const auto& [expired_nodeid, gtxid] : expired) {
270270
LogDebug(BCLog::NET, "timeout of inflight %s %s from peer=%d\n", gtxid.IsWtxid() ? "wtx" : "tx",
271271
gtxid.ToUint256().ToString(), expired_nodeid);
272272
}
273-
for (const GenTxidVariant& gtxid : requestable) {
273+
for (const GenTxid& gtxid : requestable) {
274274
if (!AlreadyHaveTx(gtxid, /*include_reconsiderable=*/false)) {
275275
LogDebug(BCLog::NET, "Requesting %s %s peer=%d\n", gtxid.IsWtxid() ? "wtx" : "tx",
276276
gtxid.ToUint256().ToString(), nodeid);
@@ -285,7 +285,7 @@ std::vector<GenTxidVariant> TxDownloadManagerImpl::GetRequestsToSend(NodeId node
285285
return requests;
286286
}
287287

288-
void TxDownloadManagerImpl::ReceivedNotFound(NodeId nodeid, const std::vector<GenTxidVariant>& gtxids)
288+
void TxDownloadManagerImpl::ReceivedNotFound(NodeId nodeid, const std::vector<GenTxid>& gtxids)
289289
{
290290
for (const auto& gtxid : gtxids) {
291291
// If we receive a NOTFOUND message for a tx we requested, mark the announcement for it as

src/node/txdownloadman_impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,21 @@ class TxDownloadManagerImpl {
155155
* - m_recent_rejects_reconsiderable (if include_reconsiderable = true)
156156
* - m_recent_confirmed_transactions
157157
* */
158-
bool AlreadyHaveTx(const GenTxidVariant& gtxid, bool include_reconsiderable);
158+
bool AlreadyHaveTx(const GenTxid& gtxid, bool include_reconsiderable);
159159

160160
void ConnectedPeer(NodeId nodeid, const TxDownloadConnectionInfo& info);
161161
void DisconnectedPeer(NodeId nodeid);
162162

163163
/** Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received.
164164
* Also called internally when a transaction is missing parents so that we can request them.
165165
*/
166-
bool AddTxAnnouncement(NodeId peer, const GenTxidVariant& gtxid, std::chrono::microseconds now);
166+
bool AddTxAnnouncement(NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now);
167167

168168
/** Get getdata requests to send. */
169-
std::vector<GenTxidVariant> GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time);
169+
std::vector<GenTxid> GetRequestsToSend(NodeId nodeid, std::chrono::microseconds current_time);
170170

171171
/** Marks a tx as ReceivedResponse in txrequest. */
172-
void ReceivedNotFound(NodeId nodeid, const std::vector<GenTxidVariant>& gtxids);
172+
void ReceivedNotFound(NodeId nodeid, const std::vector<GenTxid>& gtxids);
173173

174174
/** Look for a child of this transaction in the orphanage to form a 1-parent-1-child package,
175175
* skipping any combinations that have already been tried. Return the resulting package along with

src/protocol.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ std::vector<std::string> serviceFlagsToStr(uint64_t flags)
118118
return str_flags;
119119
}
120120

121-
GenTxidVariant ToGenTxid(const CInv& inv)
121+
GenTxid ToGenTxid(const CInv& inv)
122122
{
123123
assert(inv.IsGenTxMsg());
124-
return inv.IsMsgWtx() ? GenTxidVariant{Wtxid::FromUint256(inv.hash)} : GenTxidVariant{Txid::FromUint256(inv.hash)};
124+
return inv.IsMsgWtx() ? GenTxid{Wtxid::FromUint256(inv.hash)} : GenTxid{Txid::FromUint256(inv.hash)};
125125
}

src/protocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,6 @@ class CInv
526526
};
527527

528528
/** Convert a TX/WITNESS_TX/WTX CInv to a GenTxid. */
529-
GenTxidVariant ToGenTxid(const CInv& inv);
529+
GenTxid ToGenTxid(const CInv& inv);
530530

531531
#endif // BITCOIN_PROTOCOL_H

src/test/fuzz/txdownloadman.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ FUZZ_TARGET(txdownloadman, .init = initialize)
228228
},
229229
[&] {
230230
auto gtxid = fuzzed_data_provider.ConsumeBool() ?
231-
GenTxidVariant{rand_tx->GetHash()} :
232-
GenTxidVariant{rand_tx->GetWitnessHash()};
231+
GenTxid{rand_tx->GetHash()} :
232+
GenTxid{rand_tx->GetWitnessHash()};
233233
txdownloadman.AddTxAnnouncement(rand_peer, gtxid, time);
234234
},
235235
[&] {
@@ -373,8 +373,8 @@ FUZZ_TARGET(txdownloadman_impl, .init = initialize)
373373
},
374374
[&] {
375375
auto gtxid = fuzzed_data_provider.ConsumeBool() ?
376-
GenTxidVariant{rand_tx->GetHash()} :
377-
GenTxidVariant{rand_tx->GetWitnessHash()};
376+
GenTxid{rand_tx->GetHash()} :
377+
GenTxid{rand_tx->GetWitnessHash()};
378378
txdownload_impl.AddTxAnnouncement(rand_peer, gtxid, time);
379379
},
380380
[&] {

src/test/fuzz/txrequest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Tester
204204
}
205205

206206
// Call TxRequestTracker's implementation.
207-
auto gtxid = is_wtxid ? GenTxidVariant{Wtxid::FromUint256(TXHASHES[txhash])} : GenTxidVariant{Txid::FromUint256(TXHASHES[txhash])};
207+
auto gtxid = is_wtxid ? GenTxid{Wtxid::FromUint256(TXHASHES[txhash])} : GenTxid{Txid::FromUint256(TXHASHES[txhash])};
208208
m_tracker.ReceivedInv(peer, gtxid, preferred, reqtime);
209209
}
210210

@@ -247,13 +247,13 @@ class Tester
247247

248248
//! list of (sequence number, txhash, is_wtxid) tuples.
249249
std::vector<std::tuple<uint64_t, int, bool>> result;
250-
std::vector<std::pair<NodeId, GenTxidVariant>> expected_expired;
250+
std::vector<std::pair<NodeId, GenTxid>> expected_expired;
251251
for (int txhash = 0; txhash < MAX_TXHASHES; ++txhash) {
252252
// Mark any expired REQUESTED announcements as COMPLETED.
253253
for (int peer2 = 0; peer2 < MAX_PEERS; ++peer2) {
254254
Announcement& ann2 = m_announcements[txhash][peer2];
255255
if (ann2.m_state == State::REQUESTED && ann2.m_time <= m_now) {
256-
auto gtxid = ann2.m_is_wtxid ? GenTxidVariant{Wtxid::FromUint256(TXHASHES[txhash])} : GenTxidVariant{Txid::FromUint256(TXHASHES[txhash])};
256+
auto gtxid = ann2.m_is_wtxid ? GenTxid{Wtxid::FromUint256(TXHASHES[txhash])} : GenTxid{Txid::FromUint256(TXHASHES[txhash])};
257257
expected_expired.emplace_back(peer2, gtxid);
258258
ann2.m_state = State::COMPLETED;
259259
break;
@@ -272,7 +272,7 @@ class Tester
272272
std::sort(expected_expired.begin(), expected_expired.end());
273273

274274
// Compare with TxRequestTracker's implementation.
275-
std::vector<std::pair<NodeId, GenTxidVariant>> expired;
275+
std::vector<std::pair<NodeId, GenTxid>> expired;
276276
const auto actual = m_tracker.GetRequestable(peer, m_now, &expired);
277277
std::sort(expired.begin(), expired.end());
278278
assert(expired == expected_expired);

src/test/txrequest_tests.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct Runner
6161
/** Which (peer, gtxid) combinations are known to be expired. These need to be accumulated here instead of
6262
* checked directly in the GetRequestable return value to avoid introducing a dependency between the various
6363
* parallel tests. */
64-
std::multiset<std::pair<NodeId, GenTxidVariant>> expired;
64+
std::multiset<std::pair<NodeId, GenTxid>> expired;
6565
};
6666

6767
std::chrono::microseconds TxRequestTest::RandomTime8s() { return std::chrono::microseconds{1 + m_rng.randbits(23)}; }
@@ -110,7 +110,7 @@ class Scenario
110110
}
111111

112112
/** Schedule a ReceivedInv call at the Scheduler's current time. */
113-
void ReceivedInv(NodeId peer, const GenTxidVariant& gtxid, bool pref, std::chrono::microseconds reqtime)
113+
void ReceivedInv(NodeId peer, const GenTxid& gtxid, bool pref, std::chrono::microseconds reqtime)
114114
{
115115
auto& runner = m_runner;
116116
runner.actions.emplace_back(m_now, [=, &runner]() {
@@ -160,7 +160,7 @@ class Scenario
160160
* @param offset Offset with the current time to use (must be <= 0). This allows simulations of time going
161161
* backwards (but note that the ordering of this event only follows the scenario's m_now.
162162
*/
163-
void Check(NodeId peer, const std::vector<GenTxidVariant>& expected, size_t candidates, size_t inflight,
163+
void Check(NodeId peer, const std::vector<GenTxid>& expected, size_t candidates, size_t inflight,
164164
size_t completed, const std::string& checkname,
165165
std::chrono::microseconds offset = std::chrono::microseconds{0})
166166
{
@@ -169,7 +169,7 @@ class Scenario
169169
const auto now = m_now;
170170
assert(offset.count() <= 0);
171171
runner.actions.emplace_back(m_now, [=, &runner]() {
172-
std::vector<std::pair<NodeId, GenTxidVariant>> expired_now;
172+
std::vector<std::pair<NodeId, GenTxid>> expired_now;
173173
auto ret = runner.txrequest.GetRequestable(peer, now + offset, &expired_now);
174174
for (const auto& entry : expired_now) {
175175
runner.expired.insert(entry);
@@ -191,12 +191,12 @@ class Scenario
191191
*
192192
* Every expected expiration should be accounted for through exactly one call to this function.
193193
*/
194-
void CheckExpired(NodeId peer, GenTxidVariant gtxid)
194+
void CheckExpired(NodeId peer, GenTxid gtxid)
195195
{
196196
const auto& testname = m_testname;
197197
auto& runner = m_runner;
198198
runner.actions.emplace_back(m_now, [=, &runner]() {
199-
auto it = runner.expired.find(std::pair<NodeId, GenTxidVariant>{peer, gtxid});
199+
auto it = runner.expired.find(std::pair<NodeId, GenTxid>{peer, gtxid});
200200
BOOST_CHECK_MESSAGE(it != runner.expired.end(), "[" + testname + "] missing expiration");
201201
if (it != runner.expired.end()) runner.expired.erase(it);
202202
});
@@ -236,10 +236,10 @@ class Scenario
236236
}
237237

238238
/** Generate a random GenTxid; the txhash follows NewTxHash; the transaction identifier is random. */
239-
GenTxidVariant NewGTxid(const std::vector<std::vector<NodeId>>& orders = {})
239+
GenTxid NewGTxid(const std::vector<std::vector<NodeId>>& orders = {})
240240
{
241241
const uint256 txhash{NewTxHash(orders)};
242-
return m_rng.randbool() ? GenTxidVariant{Wtxid::FromUint256(txhash)} : GenTxidVariant{Txid::FromUint256(txhash)};
242+
return m_rng.randbool() ? GenTxid{Wtxid::FromUint256(txhash)} : GenTxid{Txid::FromUint256(txhash)};
243243
}
244244

245245
/** Generate a new random NodeId to use as peer. The same NodeId is never returned twice

0 commit comments

Comments
 (0)