diff options
| author | mtg0001 <106211915+mtg0001@users.noreply.github.com> | 2026-08-01 15:15:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 15:15:15 -0300 |
| commit | a2726cad9e9e11c73ae341ec627a696cdeb63edc (patch) | |
| tree | e8bdce8982ecf38b5a1aeda4aee4d5c000626309 /src/main.cpp | |
| parent | b65c19e559e2fec511f40a4d5481bcf6a35c311c (diff) | |
Add wallet keypool self-test (#91)
Co-authored-by: Gilcimar Duarte <ti@gpm.infra>
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 68ae44c..82a98d2 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -217,6 +217,11 @@ vector<unsigned char> GetKeyFromPool() | |||
| 217 | vector<unsigned char> vchPubKey = mi->second; | 217 | vector<unsigned char> vchPubKey = mi->second; |
| 218 | mapKeyPool.erase(mi); | 218 | mapKeyPool.erase(mi); |
| 219 | CWalletDB().ErasePool(nIndex); | 219 | CWalletDB().ErasePool(nIndex); |
| 220 | // Leave the wallet with a full backup window after each draw too, | ||
| 221 | // not only immediately before a draw. If topping up fails, the key | ||
| 222 | // already chosen is still safe to use -- its private half was | ||
| 223 | // written before it entered the pool. | ||
| 224 | TopUpKeyPool(); | ||
| 220 | return vchPubKey; | 225 | return vchPubKey; |
| 221 | } | 226 | } |
| 222 | } | 227 | } |