This repository was archived by the owner on Dec 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
PrivateCoin deserializarion #10
Copy link
Copy link
Open
Description
PrivateCoin object deserializarion doesn't work.
Just one example:
libzerocoin::PrivateCoin newCoin(params);
CDataStream serializedPrivCoin(SER_NETWORK, PROTOCOL_VERSION);
serializedPrivCoin << newCoin;
libzerocoin::PrivateCoin newPrivCoin(params, serializedPrivCoin); // Compilation fails here
Compilation fails with the following output
In file included from ../Zerocoin.h:52:0,
from ../Test.cpp:20:
../Coin.h: In constructor 'libzerocoin::PrivateCoin::PrivateCoin(const libzerocoin::Params*, Stream&) [with Stream = CDataStream]':
../Test.cpp:92:66: instantiated from here
../Coin.h:88:54: error: no matching function for call to 'libzerocoin::PublicCoin::PublicCoin()'
../Coin.h:88:54: note: candidates are:
../Coin.h:50:2: note: libzerocoin::PublicCoin::PublicCoin(const libzerocoin::Params*, const Bignum&, libzerocoin::CoinDenomination)
../Coin.h:50:2: note: candidate expects 3 arguments, 0 provided
../Coin.h:42:2: note: libzerocoin::PublicCoin::PublicCoin(const libzerocoin::Params*)
../Coin.h:42:2: note: candidate expects 1 argument, 0 provided
../Coin.h:38:2: note: template<class Stream> libzerocoin::PublicCoin::PublicCoin(const libzerocoin::Params*, Stream&)
../Coin.h:35:7: note: libzerocoin::PublicCoin::PublicCoin(const libzerocoin::PublicCoin&)
../Coin.h:35:7: note: candidate expects 1 argument, 0 provided
make: *** [Test.o] Error 1
$
It seems that something wrong with newPrivCoin->publicCoin property initializarion. I guess that empty constructor should be added into the PublicCoin class implementation.
Metadata
Metadata
Assignees
Labels
No labels