Skip to content

Commit

Permalink
Noir Core 1.0.1.1
Browse files Browse the repository at this point in the history
- Temporarily disable Zerocoin
  • Loading branch information
flo071 committed Apr 26, 2019
1 parent e7c863a commit 72d4483
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 0
#define CLIENT_VERSION_BUILD 1

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
22 changes: 21 additions & 1 deletion src/main.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,16 @@ bool AcceptToMemoryPoolWorker(CTxMemPool &pool, CValidationState &state, const C
return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-in-mempool");
// Check for conflicts with in-memory transactions
set <uint256> setConflicts;

/*
* Temporarily disable Zerocoin
*/
if (tx.IsZerocoinSpend())
{
LogPrintf("AcceptToMemoryPoolWorker(): Zerocoin temporarily disabled!\n");
return false;
}

//btzc
CZerocoinState *zcState = CZerocoinState::GetZerocoinState();
CBigNum zcSpendSerial;
Expand Down Expand Up @@ -2795,8 +2805,18 @@ bool ConnectBlock(const CBlock &block, CValidationState &state, CBlockIndex *pin
spentIndex.push_back(make_pair(CSpentIndexKey(input.prevout.hash, input.prevout.n), CSpentIndexValue(txHash, j, pindex->nHeight, prevout.nValue, addressType, hashBytes)));
}
}
}
}
}

/*
* Temporarily disable Zerocoin
*/
if (tx.IsZerocoinSpend() && !IsInitialBlockDownload())
{
LogPrintf("ConnectBlock(): Zerocoin temporarily disabled!\n");
return false;
}

if (fAddressIndex) {
for (unsigned int k = 0; k < tx.vout.size(); k++) {
const CTxOut &out = tx.vout[k];
Expand Down
4 changes: 4 additions & 0 deletions src/main.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ static std::map<int, CBlock> mapBlockData;

static const bool DEFAULT_PEERBLOOMFILTERS = true;

/*
* Temporarily disable Zerocoin
*/
static const bool disableZerocoin = true;

static const int DevRewardStartBlock = 230250;
static const int DevRewardStopBlock = 255250;
Expand Down
2 changes: 2 additions & 0 deletions src/qt/menupage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ MenuPage::MenuPage(QWidget *parent) :
ui->setupUi(this);
ui->Noirnode->setEnabled(true);

ui->Zerocoin->setEnabled(false);

connect(ui->Overview, SIGNAL(pressed()), this, SLOT(ClickedItem()));
connect(ui->Send, SIGNAL(pressed()), this, SLOT(ClickedItem()));
connect(ui->Receive, SIGNAL(pressed()), this, SLOT(ClickedItem()));
Expand Down
Binary file modified src/qt/res/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2649,6 +2649,9 @@ UniValue mintzerocoin(const UniValue& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error("mintzerocoin <amount>(1,10,25,50,100)\n" + HelpRequiringPassphrase());

if (disableZerocoin)
throw JSONRPCError(RPC_WALLET_ERROR, "Zerocoin temporarily disabled!");

int64_t nAmount = 0;
libzerocoin::CoinDenomination denomination;
// Amount
Expand Down Expand Up @@ -2738,6 +2741,8 @@ UniValue spendzerocoin(const UniValue& params, bool fHelp) {
);
LOCK2(cs_main, pwalletMain->cs_wallet);

if (disableZerocoin)
throw JSONRPCError(RPC_WALLET_ERROR, "Zerocoin temporarily disabled!");

int64_t nAmount = 0;
libzerocoin::CoinDenomination denomination;
Expand Down

0 comments on commit 72d4483

Please sign in to comment.