diff --git a/src/libzerocoin/CoinSpend.cpp b/src/libzerocoin/CoinSpend.cpp index a6074448c67bb..3e34d7dc725d6 100644 --- a/src/libzerocoin/CoinSpend.cpp +++ b/src/libzerocoin/CoinSpend.cpp @@ -18,14 +18,15 @@ namespace libzerocoin { CoinSpend::CoinSpend(const ZerocoinParams* paramsCoin, const ZerocoinParams* paramsAcc, const PrivateCoin& coin, Accumulator& a, const uint32_t& checksum, - const AccumulatorWitness& witness, const uint256& ptxHash, const SpendType& spendType) : accChecksum(checksum), - ptxHash(ptxHash), + const AccumulatorWitness& witness, const uint256& ptxHash, const SpendType& spendType) : coinSerialNumber((coin.getSerialNumber())), + spendType(spendType), + ptxHash(ptxHash), + accChecksum(checksum), accumulatorPoK(¶msAcc->accumulatorParams), serialNumberSoK(paramsCoin), commitmentPoK(¶msCoin->serialNumberSoKCommitmentGroup, - ¶msAcc->accumulatorParams.accumulatorPoKCommitmentGroup), - spendType(spendType) + ¶msAcc->accumulatorParams.accumulatorPoKCommitmentGroup) { denomination = coin.getPublicCoin().getDenomination(); version = coin.getVersion(); diff --git a/src/libzerocoin/CoinSpend.h b/src/libzerocoin/CoinSpend.h index ff4bfc01c1313..999e59c1ed7d7 100644 --- a/src/libzerocoin/CoinSpend.h +++ b/src/libzerocoin/CoinSpend.h @@ -89,6 +89,9 @@ class CoinSpend CoinSpend(const ZerocoinParams* paramsCoin, const ZerocoinParams* paramsAcc, const PrivateCoin& coin, Accumulator& a, const uint32_t& checksum, const AccumulatorWitness& witness, const uint256& ptxHash, const SpendType& spendType); + + virtual ~CoinSpend(){}; + /** Returns the serial number of the coin spend by this proof. * * @return the coin's serial number diff --git a/src/zpiv/zpivmodule.h b/src/zpiv/zpivmodule.h index 65b9c5270fe8d..0fd5b2cf29d57 100644 --- a/src/zpiv/zpivmodule.h +++ b/src/zpiv/zpivmodule.h @@ -35,6 +35,8 @@ class PublicCoinSpend : public libzerocoin::CoinSpend{ this->version = COIN_SPEND_PUBLIC_SPEND_VERSION; }; + ~PublicCoinSpend(){}; + template PublicCoinSpend( libzerocoin::ZerocoinParams* params,