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.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 997ca1e2f5..238f62a575 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2583,14 +2583,15 @@ void CWallet::UpdatedTransaction(const uint256 &hashTx)
}
}
-void CWallet::GetScriptForMining(CScript &script)
+void CWallet::GetScriptForMining(boost::shared_ptr<CReserveScript> &script)
{
- CReserveKey reservekey(this);
+ boost::shared_ptr<CReserveKey> rKey(new CReserveKey(this));
CPubKey pubkey;
- if (!reservekey.GetReservedKey(pubkey))
+ if (!rKey->GetReservedKey(pubkey))
return;
- script = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
- reservekey.KeepKey();
+
+ script = rKey;
+ script->reserveScript = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
}
void CWallet::LockCoin(COutPoint& output)