You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change listMints() to std::set. Add mapPendingSpends to track spends.
-Change to set to reduce BigO complexity.
-add mapPendingSpends to keep track of spends that were made so that they do not get considered as falsly marked as not used while they are in the mempool.
Check mempool for pending spends.
Copy file name to clipboardExpand all lines: src/libzerocoin/CoinSpend.cpp
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ namespace libzerocoin
34
34
// Sanity check: let's verify that the Witness is valid with respect to
35
35
// the coin and Accumulator provided.
36
36
if (!(witness.VerifyWitness(a, coin.getPublicCoin()))) {
37
-
std::cout << "CoinSpend: Accumulator witness does not verify\n";
37
+
//std::cout << "CoinSpend: Accumulator witness does not verify\n";
38
38
throwstd::runtime_error("Accumulator witness does not verify");
39
39
}
40
40
@@ -75,28 +75,28 @@ bool CoinSpend::Verify(const Accumulator& a) const
75
75
{
76
76
// Double check that the version is the same as marked in the serial
77
77
if (ExtractVersionFromSerial(coinSerialNumber) != version) {
78
-
cout << "CoinSpend::Verify: version does not match serial=" << (int)ExtractVersionFromSerial(coinSerialNumber) << " actual=" << (int)version << endl;
78
+
//cout << "CoinSpend::Verify: version does not match serial=" << (int)ExtractVersionFromSerial(coinSerialNumber) << " actual=" << (int)version << endl;
79
79
returnfalse;
80
80
}
81
81
82
82
if (a.getDenomination() != this->denomination) {
83
-
std::cout << "CoinsSpend::Verify: failed, denominations do not match\n";
83
+
//std::cout << "CoinsSpend::Verify: failed, denominations do not match\n";
84
84
returnfalse;
85
85
}
86
86
87
87
// Verify both of the sub-proofs using the given meta-data
88
88
if (!commitmentPoK.Verify(serialCommitmentToCoinValue, accCommitmentToCoinValue)) {
0 commit comments