From a2726cad9e9e11c73ae341ec627a696cdeb63edc Mon Sep 17 00:00:00 2001 From: mtg0001 <106211915+mtg0001@users.noreply.github.com> Date: Sat, 1 Aug 2026 15:15:15 -0300 Subject: Add wallet keypool self-test (#91) Co-authored-by: Gilcimar Duarte --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') 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 GetKeyFromPool() vector vchPubKey = mi->second; mapKeyPool.erase(mi); CWalletDB().ErasePool(nIndex); + // Leave the wallet with a full backup window after each draw too, + // not only immediately before a draw. If topping up fails, the key + // already chosen is still safe to use -- its private half was + // written before it entered the pool. + TopUpKeyPool(); return vchPubKey; } } -- cgit v1.2.3