diff --git a/src/blsct/wallet/verification.cpp b/src/blsct/wallet/verification.cpp index 67c973673f5e7..c095fe633bdf8 100644 --- a/src/blsct/wallet/verification.cpp +++ b/src/blsct/wallet/verification.cpp @@ -32,9 +32,9 @@ bool VerifyTx(const CTransaction& tx, const CCoinsViewCache& view, const CAmount return false; } - vPubKeys.push_back(coin.out.blsctData.spendingKey); + vPubKeys.emplace_back(coin.out.blsctData.spendingKey); auto in_hash = in.GetHash(); - vMessages.push_back(Message(in_hash.begin(), in_hash.end())); + vMessages.emplace_back(Message(in_hash.begin(), in_hash.end())); balanceKey = balanceKey + coin.out.blsctData.rangeProof.Vs[0]; } } @@ -43,10 +43,10 @@ bool VerifyTx(const CTransaction& tx, const CCoinsViewCache& view, const CAmount for (auto& out : tx.vout) { if (out.IsBLSCT()) { - vPubKeys.push_back(out.blsctData.ephemeralKey); + vPubKeys.emplace_back(out.blsctData.ephemeralKey); auto out_hash = out.GetHash(); - vMessages.push_back(Message(out_hash.begin(), out_hash.end())); - vProofs.push_back(out.blsctData.rangeProof); + vMessages.emplace_back(Message(out_hash.begin(), out_hash.end())); + vProofs.emplace_back(out.blsctData.rangeProof); balanceKey = balanceKey - out.blsctData.rangeProof.Vs[0]; } else { if (!out.scriptPubKey.IsUnspendable() && out.nValue > 0) { @@ -62,10 +62,10 @@ bool VerifyTx(const CTransaction& tx, const CCoinsViewCache& view, const CAmount } } - vMessages.push_back(blsct::Common::BLSCTBALANCE); - vPubKeys.push_back(balanceKey); + vMessages.emplace_back(blsct::Common::BLSCTBALANCE); + vPubKeys.emplace_back(balanceKey); return PublicKeys{vPubKeys}.VerifyBatch(vMessages, tx.txSig, true) && rp.Verify(vProofs); } -} // namespace blsct \ No newline at end of file +} // namespace blsct