Merge pull request #467 from gavinandresen/keypoolzero

Logic running with -keypool=0 was wrong (empty keys were being returned).
This commit is contained in:
Gavin Andresen
2011-09-01 12:01:29 -07:00
5 changed files with 48 additions and 28 deletions

View File

@@ -2183,7 +2183,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
// Keep giving the same key to the same ip until they use it
if (!mapReuseKey.count(pfrom->addr.ip))
mapReuseKey[pfrom->addr.ip] = pwalletMain->GetOrReuseKeyFromPool();
pwalletMain->GetKeyFromPool(mapReuseKey[pfrom->addr.ip], true);
// Send back approval of order and pubkey to use
CScript scriptPubKey;