File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1919#include " zpiv/zerocoin.h"
2020#include " chainparams.h"
2121
22+ static int const COIN_SPEND_PUBLIC_SPEND_VERSION = 3 ;
23+
2224class PublicCoinSpend : public libzerocoin ::CoinSpend{
2325public:
2426
@@ -30,6 +32,7 @@ class PublicCoinSpend : public libzerocoin::CoinSpend{
3032 this ->randomness = randomness;
3133 this ->pubkey = pubkey;
3234 this ->spendType = libzerocoin::SpendType::SPEND;
35+ this ->version = COIN_SPEND_PUBLIC_SPEND_VERSION;
3336 };
3437
3538 template <typename Stream>
@@ -40,8 +43,6 @@ class PublicCoinSpend : public libzerocoin::CoinSpend{
4043 this ->spendType = libzerocoin::SpendType::SPEND;
4144 }
4245
43- uint8_t getVersion () const { return libzerocoin::PrivateCoin::PUBKEY_VERSION; }
44-
4546 const uint256 signatureHash () const override ;
4647 void setVchSig (std::vector<unsigned char > vchSig) { this ->vchSig = vchSig; };
4748 bool Verify (const libzerocoin::Accumulator& a, bool verifyParams = true ) const override ;
@@ -58,6 +59,7 @@ class PublicCoinSpend : public libzerocoin::CoinSpend{
5859
5960 template <typename Stream, typename Operation>
6061 inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
62+ READWRITE (version);
6163 READWRITE (coinSerialNumber);
6264 READWRITE (randomness);
6365 READWRITE (pubkey);
You can’t perform that action at this time.
0 commit comments