git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d9c2b14
)
PPCoin: bug fix: malformed coinstake transaction created when balance is 0
author
Sunny King
<p2pcoin@gmail.com>
Sat, 18 Feb 2012 16:36:06 +0000 (16:36 +0000)
committer
Sunny King
<p2pcoin@gmail.com>
Sat, 18 Feb 2012 16:36:06 +0000 (16:36 +0000)
introduced with coinstake transaction (
71a5b227
)
src/wallet.cpp
patch
|
blob
|
history
diff --git
a/src/wallet.cpp
b/src/wallet.cpp
index
8405d16
..
52d77ac
100644
(file)
--- a/
src/wallet.cpp
+++ b/
src/wallet.cpp
@@
-1073,6
+1073,8
@@
bool CWallet::CreateCoinStake(CScript scriptPubKey, CTransaction& txNew)
int64 nValueIn = 0;
if (!SelectCoins(GetBalance(), txNew.nTime, setCoins, nValueIn))
return false;
+ if (setCoins.empty())
+ return false;
int64 nCredit = 0;
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
{