From c546ac11a6e9416a1f79476f78cb02c67d5bc172 Mon Sep 17 00:00:00 2001 From: random-zebra Date: Wed, 8 Jan 2020 09:56:17 +0100 Subject: [PATCH] [Cleanup][Wallet] Remove unused nSearchInterval field in CreateCoinStake Github-Pull: #1245 Rebased-From: 6b2b81369a2b7d509c3ebf9891a0b07f50bc741f --- src/miner.cpp | 2 +- src/wallet/wallet.cpp | 1 - src/wallet/wallet.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index e2e619625b3d9..34cab4d10258a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -170,7 +170,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn, CWallet* pwallet, bool fStakeFound = false; if (nSearchTime >= nLastCoinStakeSearchTime) { int64_t nTxNewTime = 0; - if (pwallet->CreateCoinStake(*pwallet, pindexPrev, pblock->nBits, nSearchTime - nLastCoinStakeSearchTime, txCoinStake, nTxNewTime)) { + if (pwallet->CreateCoinStake(*pwallet, pindexPrev, pblock->nBits, txCoinStake, nTxNewTime)) { pblock->nTime = nTxNewTime; pblock->vtx[0].vout[0].SetEmpty(); pblock->vtx.push_back(CTransaction(txCoinStake)); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3dfc389bdff4e..d7c2a25f0ed88 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2655,7 +2655,6 @@ bool CWallet::CreateCoinStake( const CKeyStore& keystore, const CBlockIndex* pindexPrev, unsigned int nBits, - int64_t nSearchInterval, CMutableTransaction& txNew, int64_t& nTxNewTime ) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ae4b738c60607..131f860fe9c16 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -449,7 +449,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand = "tx"); bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb); int GenerateObfuscationOutputs(int nTotalValue, std::vector& vout); - bool CreateCoinStake(const CKeyStore& keystore, const CBlockIndex* pindexPrev, unsigned int nBits, int64_t nSearchInterval, CMutableTransaction& txNew, int64_t& nTxNewTime); + bool CreateCoinStake(const CKeyStore& keystore, const CBlockIndex* pindexPrev, unsigned int nBits, CMutableTransaction& txNew, int64_t& nTxNewTime); bool MultiSend(); void AutoCombineDust(); void AutoZeromint();