Post
Topic
Board Development & Technical Discussion
Re: Key pool feature for safer wallet backup
by
nelisky
on 18/10/2010, 13:30:28 UTC
I just need a way to know if the addresses on the wallet are covered by the last backup, and if there are still leftover addresses in the wallet, without depending on running counts and persistent data not stored in bitcoin directly.

Keys in the keypool store when they're generated (and the oldest are always used first).   Asking "what's the oldest key in the key pool" seems reasonable, and I think it would give you what you want-- you could compare that timestamp to the timestamp of your last backup to see if you're covered.

Although if you're going to periodically check to see what the oldest timestamp is (or you're going to periodically check to see if bitcoin has written a new timestamped backup file or periodically check WHATEVER) then it seems simpler to me to just periodically always call backupwallet.  Disk space and bandwidth is cheap these days...


Yes, I will keep calling backupwallet regularly regardless, but how often do I do it? That's the answer this whole thing will be able to provide, as it's not a static thing. I can then check every minute but backup every day, unless I hit a peak usage and have to put an intermediate backup. And if these happen a few times in a row, I'll adjust the auto backup time frame.