Logic running with -keypool=0 was wrong (empty keys were being returned). Fixes #445

Renames GetOrReuseKeyFromKeyPool to GetKeyFromPool, with fAllowReuse arg and bool result.
This commit is contained in:
Gavin Andresen
2011-08-12 16:32:07 -04:00
parent f662cefd85
commit 7db3b75b3e
5 changed files with 42 additions and 25 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;