diff options
Diffstat (limited to 'src/db.h')
| -rw-r--r-- | src/db.h | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -386,6 +386,19 @@ public: | |||
| 386 | return Write(string("defaultkey"), vchPubKey); | 386 | return Write(string("defaultkey"), vchPubKey); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | // Keys generated ahead of time and not yet handed out. The private key of | ||
| 390 | // each is already stored under its own "key" record by AddKey; a "pool" | ||
| 391 | // record only says that this one is still unspoken for. | ||
| 392 | bool WritePool(int64 nIndex, const vector<unsigned char>& vchPubKey) | ||
| 393 | { | ||
| 394 | return Write(make_pair(string("pool"), nIndex), vchPubKey); | ||
| 395 | } | ||
| 396 | |||
| 397 | bool ErasePool(int64 nIndex) | ||
| 398 | { | ||
| 399 | return Erase(make_pair(string("pool"), nIndex)); | ||
| 400 | } | ||
| 401 | |||
| 389 | template<typename T> | 402 | template<typename T> |
| 390 | bool ReadSetting(const string& strKey, T& value) | 403 | bool ReadSetting(const string& strKey, T& value) |
| 391 | { | 404 | { |