aboutsummaryrefslogtreecommitdiff
path: root/src/test/sighash_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-04 13:53:40 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-12 11:27:19 +0200
commitfa05a726c225dc65dee79367bb67f099ae4f99e6 (patch)
tree8bf1f8a82fcf024fe110ac76f9563acf2b1132cf /src/test/sighash_tests.cpp
parent4a5aae9330780c3740e27cc511f7cba1fab745b9 (diff)
downloadbitcoin-fa05a726c225dc65dee79367bb67f099ae4f99e6.tar.xz
tidy: modernize-use-emplace
Diffstat (limited to 'src/test/sighash_tests.cpp')
-rw-r--r--src/test/sighash_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 178b16772b..9653edd84b 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -100,7 +100,7 @@ void static RandomTransaction(CMutableTransaction& tx, bool fSingle)
int ins = (InsecureRandBits(2)) + 1;
int outs = fSingle ? ins : (InsecureRandBits(2)) + 1;
for (int in = 0; in < ins; in++) {
- tx.vin.push_back(CTxIn());
+ tx.vin.emplace_back();
CTxIn &txin = tx.vin.back();
txin.prevout.hash = InsecureRand256();
txin.prevout.n = InsecureRandBits(2);
@@ -108,7 +108,7 @@ void static RandomTransaction(CMutableTransaction& tx, bool fSingle)
txin.nSequence = (InsecureRandBool()) ? InsecureRand32() : std::numeric_limits<uint32_t>::max();
}
for (int out = 0; out < outs; out++) {
- tx.vout.push_back(CTxOut());
+ tx.vout.emplace_back();
CTxOut &txout = tx.vout.back();
txout.nValue = InsecureRandMoneyAmount();
RandomScript(txout.scriptPubKey);