@@ -1201,7 +1201,7 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>&
1201
1201
}
1202
1202
}
1203
1203
1204
- std::vector<uint256 > all_package_wtxids;
1204
+ std::vector<Wtxid > all_package_wtxids;
1205
1205
all_package_wtxids.reserve (workspaces.size ());
1206
1206
std::transform (workspaces.cbegin (), workspaces.cend (), std::back_inserter (all_package_wtxids),
1207
1207
[](const auto & ws) { return ws.m_ptx ->GetWitnessHash (); });
@@ -1211,7 +1211,7 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>&
1211
1211
const auto effective_feerate = args.m_package_feerates ? ws.m_package_feerate :
1212
1212
CFeeRate{ws.m_modified_fees , static_cast <uint32_t >(ws.m_vsize )};
1213
1213
const auto effective_feerate_wtxids = args.m_package_feerates ? all_package_wtxids :
1214
- std::vector<uint256>( {ws.m_ptx ->GetWitnessHash ()}) ;
1214
+ std::vector<Wtxid> {ws.m_ptx ->GetWitnessHash ()};
1215
1215
results.emplace (ws.m_ptx ->GetWitnessHash (),
1216
1216
MempoolAcceptResult::Success (std::move (ws.m_replaced_transactions ), ws.m_vsize ,
1217
1217
ws.m_base_fees , effective_feerate, effective_feerate_wtxids));
@@ -1226,6 +1226,7 @@ MempoolAcceptResult MemPoolAccept::AcceptSingleTransaction(const CTransactionRef
1226
1226
LOCK (m_pool.cs ); // mempool "read lock" (held through GetMainSignals().TransactionAddedToMempool())
1227
1227
1228
1228
Workspace ws (ptx);
1229
+ const std::vector<Wtxid> single_wtxid{ws.m_ptx ->GetWitnessHash ()};
1229
1230
1230
1231
if (!PreChecks (args, ws)) return MempoolAcceptResult::Failure (ws.m_state );
1231
1232
@@ -1238,7 +1239,6 @@ MempoolAcceptResult MemPoolAccept::AcceptSingleTransaction(const CTransactionRef
1238
1239
if (!ConsensusScriptChecks (args, ws)) return MempoolAcceptResult::Failure (ws.m_state );
1239
1240
1240
1241
const CFeeRate effective_feerate{ws.m_modified_fees , static_cast <uint32_t >(ws.m_vsize )};
1241
- const std::vector<uint256> single_wtxid{ws.m_ptx ->GetWitnessHash ()};
1242
1242
// Tx was accepted, but not added
1243
1243
if (args.m_test_accept ) {
1244
1244
return MempoolAcceptResult::Success (std::move (ws.m_replaced_transactions ), ws.m_vsize ,
@@ -1314,7 +1314,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
1314
1314
return PackageMempoolAcceptResult (package_state, std::move (results));
1315
1315
}
1316
1316
1317
- std::vector<uint256 > all_package_wtxids;
1317
+ std::vector<Wtxid > all_package_wtxids;
1318
1318
all_package_wtxids.reserve (workspaces.size ());
1319
1319
std::transform (workspaces.cbegin (), workspaces.cend (), std::back_inserter (all_package_wtxids),
1320
1320
[](const auto & ws) { return ws.m_ptx ->GetWitnessHash (); });
@@ -1330,7 +1330,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
1330
1330
const auto effective_feerate = args.m_package_feerates ? ws.m_package_feerate :
1331
1331
CFeeRate{ws.m_modified_fees , static_cast <uint32_t >(ws.m_vsize )};
1332
1332
const auto effective_feerate_wtxids = args.m_package_feerates ? all_package_wtxids :
1333
- std::vector<uint256 >{ws.m_ptx ->GetWitnessHash ()};
1333
+ std::vector<Wtxid >{ws.m_ptx ->GetWitnessHash ()};
1334
1334
results.emplace (ws.m_ptx ->GetWitnessHash (),
1335
1335
MempoolAcceptResult::Success (std::move (ws.m_replaced_transactions ),
1336
1336
ws.m_vsize , ws.m_base_fees , effective_feerate,
0 commit comments