diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index c93c9be08..802b8b75c 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -147,7 +147,7 @@ void ThreadNotifyWallets(CBlockIndex *pindexLastTip) // empty root. SaplingMerkleTree oldSaplingTree; if (chainParams.GetConsensus().NetworkUpgradeActive( - pindex->pprev->nHeight, Consensus::UPGRADE_SAPLING)) { + pindex->pprev->GetHeight(), Consensus::UPGRADE_SAPLING)) { assert(pcoinsTip->GetSaplingAnchorAt( pindex->pprev->hashFinalSaplingRoot, oldSaplingTree)); } else { diff --git a/src/validationinterface.h b/src/validationinterface.h index dea6e5547..bc5477c99 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -43,6 +43,7 @@ protected: virtual void Inventory(const uint256 &hash) {} virtual void ResendWalletTransactions(int64_t nBestBlockTime) {} virtual void BlockChecked(const CBlock&, const CValidationState&) {} + virtual void ResetRequestCount(const uint256 &hash) {}; friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*); friend void ::UnregisterAllValidationInterfaces(); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 0c3b96330..4673b584a 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1284,6 +1284,13 @@ public: } } + //void GetScriptForMining(boost::shared_ptr &script); + void ResetRequestCount(const uint256 &hash) + { + LOCK(cs_wallet); + mapRequestCount[hash] = 0; + }; + unsigned int GetKeyPoolSize() { AssertLockHeld(cs_wallet); // setKeyPool