git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 2:
d655a26
)
Merge pull request #412 from sgimenez/db-transactions
author
Pieter Wuille
<pieter.wuille@gmail.com>
Thu, 14 Jul 2011 12:29:09 +0000 (
05:29
-0700)
committer
Pieter Wuille
<pieter.wuille@gmail.com>
Thu, 14 Jul 2011 12:29:09 +0000 (
05:29
-0700)
Single DB transactions
src/wallet.cpp
patch
|
blob
|
history
diff --git
a/src/wallet.cpp
b/src/wallet.cpp
index
f275853
..
2ee918f
100644
(file)
--- a/
src/wallet.cpp
+++ b/
src/wallet.cpp
@@
-1320,7
+1320,13
@@
vector<unsigned char> CReserveKey::GetReservedKey()
{
CKeyPool keypool;
pwallet->ReserveKeyFromKeyPool(nIndex, keypool);
- vchPubKey = keypool.vchPubKey;
+ if (nIndex != -1)
+ vchPubKey = keypool.vchPubKey;
+ else
+ {
+ printf("CReserveKey::GetReservedKey(): Warning: using default key instead of a new key, top up your keypool.");
+ vchPubKey = pwallet->vchDefaultKey;
+ }
}
assert(!vchPubKey.empty());
return vchPubKey;