diff options
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 11 | ||||
-rw-r--r-- | src/wallet/wallet.h | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index eee57900b5..440459fdea 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2583,6 +2583,17 @@ void CWallet::UpdatedTransaction(const uint256 &hashTx) } } +void CWallet::GetScriptForMining(CScript &script) +{ + CReserveKey reservekey(this); + reservekey.KeepKey(); + + CPubKey pubkey; + if (!reservekey.GetReservedKey(pubkey)) + return; + script = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; +} + void CWallet::LockCoin(COutPoint& output) { AssertLockHeld(cs_wallet); // setLockedCoins diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b6a8e8671f..c8ce5ad221 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -680,6 +680,13 @@ public: } } + void GetScriptForMining(CScript &script); + void UpdateRequestCount(const CBlock& block) + { + LOCK(cs_wallet); + mapRequestCount[block.GetHash()] = 0; + }; + unsigned int GetKeyPoolSize() { AssertLockHeld(cs_wallet); // setKeyPool |