Skip to content

Commit

Permalink
Fixes for clang tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mxaddict committed Jan 4, 2024
1 parent 3d4b374 commit 2d65ce7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/blsct/wallet/verification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand All @@ -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) {
Expand All @@ -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
} // namespace blsct

0 comments on commit 2d65ce7

Please sign in to comment.