aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-04-10 12:49:01 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-30 21:45:46 +0200
commitd0fc10a8444484fabc3702e081ec77473c6c41d2 (patch)
tree0ffc49fc02777804ac6b48480a3fe88b39d81586 /src/wallet/wallet.cpp
parentda77a6f7611f71443914e1c71df1e52468cf507d (diff)
detach wallet from miner
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp11
1 files changed, 11 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