Skip to content

Commit 4841189

Browse files
committed
Remove duplicate functions from rebase
1 parent 092a027 commit 4841189

File tree

2 files changed

+0
-57
lines changed

2 files changed

+0
-57
lines changed

src/rpcwallet.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3761,44 +3761,6 @@ UniValue spendrawzerocoin(const UniValue& params, bool fHelp)
37613761
return DoZpivSpend(nAmount, false, true, 42, vMintsSelected, address_str);
37623762
}
37633763

3764-
3765-
UniValue clearspendcache(const UniValue& params, bool fHelp)
3766-
{
3767-
if(fHelp || params.size() != 0)
3768-
throw runtime_error(
3769-
"clearspendcache\n"
3770-
"\nClear the pre-computed zPIV spend cache, and database.\n" +
3771-
HelpRequiringPassphrase() + "\n"
3772-
3773-
"\nExamples\n" +
3774-
HelpExampleCli("clearspendcache", "") + HelpExampleRpc("clearspendcache", ""));
3775-
3776-
EnsureWalletIsUnlocked();
3777-
3778-
CzPIVTracker* zpivTracker = pwalletMain->zpivTracker.get();
3779-
3780-
{
3781-
int nTries = 0;
3782-
while (nTries < 100) {
3783-
TRY_LOCK(zpivTracker->cs_spendcache, fLocked);
3784-
if (fLocked) {
3785-
if (zpivTracker->ClearSpendCache()) {
3786-
fClearSpendCache = true;
3787-
CWalletDB walletdb("precomputes.dat", "cr+");
3788-
walletdb.EraseAllPrecomputes();
3789-
return "Successfully Cleared the Precompute Spend Cache and Database";
3790-
}
3791-
} else {
3792-
fGlobalUnlockSpendCache = true;
3793-
nTries++;
3794-
MilliSleep(100);
3795-
}
3796-
}
3797-
}
3798-
throw JSONRPCError(RPC_WALLET_ERROR, "Error: Spend cache not cleared!");
3799-
}
3800-
3801-
38023764
UniValue clearspendcache(const UniValue& params, bool fHelp)
38033765
{
38043766
if(fHelp || params.size() != 0)

src/zpiv/accumulators.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -798,25 +798,6 @@ bool CalculateAccumulatorWitnessFor(
798798
}
799799
}
800800

801-
802-
int SearchMintHeightOf(CBigNum value){
803-
uint256 txid;
804-
if (!zerocoinDB->ReadCoinMint(value, txid))
805-
throw searchMintHeightException("searchForMintHeightOf:: failed to read mint from db");
806-
807-
CTransaction txMinted;
808-
uint256 hashBlock;
809-
if (!GetTransaction(txid, txMinted, hashBlock))
810-
throw searchMintHeightException("searchForMintHeightOf:: failed to read tx");
811-
812-
int nHeightTest;
813-
if (!IsTransactionInChain(txid, nHeightTest))
814-
throw searchMintHeightException("searchForMintHeightOf:: mint tx "+ txid.GetHex() +" is not in chain");
815-
816-
return mapBlockIndex[hashBlock]->nHeight;
817-
}
818-
819-
820801
bool GenerateAccumulatorWitness(
821802
const PublicCoin &coin,
822803
Accumulator& accumulator,

0 commit comments

Comments
 (0)