aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 440459fdea..997ca1e2f5 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2586,12 +2586,11 @@ 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;
+ reservekey.KeepKey();
}
void CWallet::LockCoin(COutPoint& output)