Skip to content

Commit 7d91442

Browse files
committed
[rpc] reserve space in txns
1 parent 6c5f19d commit 7d91442

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ static RPCHelpMan testmempoolaccept()
951951
CFeeRate(AmountFromValue(request.params[1]));
952952

953953
std::vector<CTransactionRef> txns;
954+
txns.reserve(raw_transactions.size());
954955
for (const auto& rawtx : raw_transactions.getValues()) {
955956
CMutableTransaction mtx;
956957
if (!DecodeHexTx(mtx, rawtx.get_str())) {

0 commit comments

Comments
 (0)