From 087e65def97fd3a2f61fa11b9f1cd2d7bc2f5f90 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 24 Jun 2015 21:51:47 +0200 Subject: [PATCH] fix GetScriptForMining() CReserveKey::keepKey() issue --- src/wallet/wallet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 440459fde..997ca1e2f 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)