aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-06-24 21:51:47 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-30 21:45:46 +0200
commit087e65def97fd3a2f61fa11b9f1cd2d7bc2f5f90 (patch)
treedba3462062806a7f8388eedc2cc654a67304965e /src
parentd0fc10a8444484fabc3702e081ec77473c6c41d2 (diff)
downloadbitcoin-087e65def97fd3a2f61fa11b9f1cd2d7bc2f5f90.tar.xz
fix GetScriptForMining() CReserveKey::keepKey() issue
Diffstat (limited to 'src')
-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)