Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ set(SAPLING_SOURCES
./src/sapling/incrementalmerkletree.cpp
./src/sapling/transaction_builder.cpp
./src/sapling/saplingscriptpubkeyman.cpp
./src/sapling/proof.cpp
./src/sapling/sapling_operation.cpp
)

Expand Down
2 changes: 0 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ LIBSAPLING_H = \
sapling/zip32.h \
sapling/saplingscriptpubkeyman.h \
sapling/incrementalmerkletree.h \
sapling/proof.h \
sapling/sapling_transaction.h \
sapling/transaction_builder.h \
sapling/sapling_operation.h
Expand Down Expand Up @@ -577,7 +576,6 @@ libsapling_a_SOURCES = \
sapling/crypter_sapling.cpp \
sapling/saplingscriptpubkeyman.cpp \
sapling/incrementalmerkletree.cpp \
sapling/proof.cpp \
sapling/transaction_builder.cpp \
sapling/sapling_operation.cpp

Expand Down
92 changes: 0 additions & 92 deletions src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,98 +402,6 @@ class CDiskBlockIndex : public CBlockIndex
}
};

/** Legacy block index - used to retrieve old serializations */

class CLegacyBlockIndex : public CBlockIndex
{
public:
std::map<libzerocoin::CoinDenomination, int64_t> mapZerocoinSupply{};
int64_t nMint = 0;
uint256 hashNext{};
uint256 hashPrev{};
uint64_t nStakeModifier = 0;
uint256 nStakeModifierV2{};
COutPoint prevoutStake{};
unsigned int nStakeTime = 0;
std::vector<libzerocoin::CoinDenomination> vMintDenominationsInBlock;
int64_t nMoneySupply = 0;


ADD_SERIALIZE_METHODS;

template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action)
{
int nSerVersion = s.GetVersion();
if (!(s.GetType() & SER_GETHASH))
READWRITE(VARINT(nSerVersion, VarIntMode::NONNEGATIVE_SIGNED));

if (nSerVersion >= DBI_SER_VERSION_NO_ZC) {
// no extra serialized field
return;
}

if (!ser_action.ForRead()) {
// legacy block index shouldn't be used to write
return;
}

READWRITE(VARINT(nHeight, VarIntMode::NONNEGATIVE_SIGNED));
READWRITE(VARINT(nStatus));
READWRITE(VARINT(nTx));
if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
READWRITE(VARINT(nFile, VarIntMode::NONNEGATIVE_SIGNED));
if (nStatus & BLOCK_HAVE_DATA)
READWRITE(VARINT(nDataPos));
if (nStatus & BLOCK_HAVE_UNDO)
READWRITE(VARINT(nUndoPos));

if (nSerVersion > DBI_OLD_SER_VERSION) {
// Serialization with CLIENT_VERSION = 4009901
READWRITE(nMoneySupply);
READWRITE(nFlags);
READWRITE(this->nVersion);
READWRITE(vStakeModifier);
READWRITE(hashPrev);
READWRITE(hashMerkleRoot);
READWRITE(nTime);
READWRITE(nBits);
READWRITE(nNonce);
if(this->nVersion > 3) {
READWRITE(mapZerocoinSupply);
if(this->nVersion < 7) READWRITE(nAccumulatorCheckpoint);
}

} else {
// Serialization with CLIENT_VERSION = 4009900-
READWRITE(nMint);
READWRITE(nMoneySupply);
READWRITE(nFlags);
if (!Params().GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_V3_4)) {
READWRITE(nStakeModifier);
} else {
READWRITE(nStakeModifierV2);
}
if (IsProofOfStake()) {
READWRITE(prevoutStake);
READWRITE(nStakeTime);
}
READWRITE(this->nVersion);
READWRITE(hashPrev);
READWRITE(hashNext);
READWRITE(hashMerkleRoot);
READWRITE(nTime);
READWRITE(nBits);
READWRITE(nNonce);
if(this->nVersion > 3) {
READWRITE(nAccumulatorCheckpoint);
READWRITE(mapZerocoinSupply);
READWRITE(vMintDenominationsInBlock);
}
}
}
};

/** An in-memory indexed chain of blocks. */
class CChain
{
Expand Down
3 changes: 0 additions & 3 deletions src/rpc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ UniValue mnsync(const JSONRPCRequest& request)
#ifdef ENABLE_WALLET
class DescribeAddressVisitor : public boost::static_visitor<UniValue>
{
private:
isminetype mine;

public:
CWallet * const pwallet;

Expand Down
13 changes: 0 additions & 13 deletions src/sapling/proof.cpp

This file was deleted.

246 changes: 0 additions & 246 deletions src/sapling/proof.h

This file was deleted.

Loading