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

@@ -85,7 +85,7 @@ public:
void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool);
void KeepKey(int64 nIndex);
void ReturnKey(int64 nIndex);
std::vector<unsigned char> GetOrReuseKeyFromPool();
bool GetKeyFromPool(std::vector<unsigned char> &key, bool fAllowReuse=true);
int64 GetOldestKeyPoolTime();
bool IsMine(const CTxIn& txin) const;