Resolves issue #922 - "wallet passphrase timeout of several years doesn't work" #926

pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:master changing 2 files +6 −4
  1. gmaxwell commented at 9:09 PM on March 10, 2012: contributor

    No description provided.

  2. gavinandresen commented at 9:11 PM on March 10, 2012: contributor

    Instead of a double-cast, can we say that the second argument to walletpassphrase is a 64-bit integer to begin with?

  3. gmaxwell commented at 9:20 PM on March 10, 2012: contributor

    Done and tested.

  4. sipa commented at 9:20 PM on March 10, 2012: member

    ACK

  5. Resolves issue #922 - "wallet passphrase timeout of several years doesn't work"
    2^31 milliseconds is only about 25 days. Also clamps Sleep() to 10 years,
    because it currently sleeps for 0 seconds when the sleep time would cross
    2^31 seconds since the epoch. Hopefully boost will be fixed by 2028.
    82a10c8170
  6. gmaxwell commented at 10:42 PM on March 10, 2012: contributor

    I found an issue where if the sleep time crossed the year 2038 the sleep would return in zero seconds making it busyloop. This is undesirable. The underlying issue appears to be in the boost sleep implementation. I've addressed this by clamping Sleep() so that it sleeps for at most ten years.

    To be clear— the unlock can still last longer than 10 years, but some other sleeps in the code which don't retry may not last longer than 10 years.

  7. sipa commented at 5:40 AM on March 11, 2012: member

    Looks good.

  8. sipa referenced this in commit 336ba312a6 on Mar 12, 2012
  9. sipa merged this on Mar 12, 2012
  10. sipa closed this on Mar 12, 2012

  11. coblee referenced this in commit 323df3a6f3 on Jul 17, 2012
  12. suprnurd referenced this in commit d2c6b2a74e on Dec 5, 2017
  13. ptschip referenced this in commit de1f60bfcf on Jan 20, 2018
  14. lateminer referenced this in commit 49a69b8931 on Oct 30, 2019
  15. sipa referenced this in commit c020cbaa5c on Jul 14, 2021
  16. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me