Refactor HaveKeys to early return on false result #12298

pull promag wants to merge 1 commits into bitcoin:master from promag:2018-01-ismine-havekeys changing 1 files +5 −8
  1. promag commented at 11:48 PM on January 29, 2018: member

    This consists in a trivial change where the return type of HaveKeys() is now bool meaning that it returns whether all keys are in the keystore, and early returns when one isn't.

  2. Refactor HaveKeys to early return on false result 5bdbbdc096
  3. laanwj added the label Wallet on Jan 31, 2018
  4. practicalswift commented at 12:34 PM on January 31, 2018: contributor

    Concept ACK

  5. MarcoFalke commented at 8:03 PM on February 1, 2018: member

    utACK 5bdbbdc0967626a763c836a55dc7d018c15c10f2

  6. ryanofsky commented at 8:27 PM on February 5, 2018: member

    utACK 5bdbbdc0967626a763c836a55dc7d018c15c10f2. To be sure, though, there's no concern about side channel attacks here, e.g. #10564?

  7. promag commented at 8:41 PM on February 5, 2018: member

    Do you think starting the loop from a random index helps?

  8. sipa commented at 8:50 PM on February 5, 2018: member

    @ryanofsky @promag I don't think there is any reason to aim for constant time here. Someone who can observe code branches taken can presumably already derive which coins are yours. Trying to avoid that is nearly impossible (and certainly not feasible without a complete redesign).

  9. sipa commented at 8:54 PM on February 5, 2018: member

    utACK 5bdbbdc0967626a763c836a55dc7d018c15c10f2

  10. jonasschnelli commented at 6:16 AM on February 7, 2018: contributor

    utACK 5bdbbdc0967626a763c836a55dc7d018c15c10f2

  11. dcousens approved
  12. dcousens commented at 6:38 AM on February 7, 2018: contributor

    utACK if non-constant time is not an issue

  13. laanwj merged this on Feb 8, 2018
  14. laanwj closed this on Feb 8, 2018

  15. laanwj referenced this in commit a1ffddb90d on Feb 8, 2018
  16. PastaPastaPasta referenced this in commit 55ceec4e3a on Apr 13, 2020
  17. PastaPastaPasta referenced this in commit 9344927286 on Jun 9, 2020
  18. PastaPastaPasta referenced this in commit 868761f728 on Jun 9, 2020
  19. PastaPastaPasta referenced this in commit 74ab19907f on Jun 10, 2020
  20. PastaPastaPasta referenced this in commit 57204d929d on Jun 10, 2020
  21. PastaPastaPasta referenced this in commit 52c96537a4 on Jun 11, 2020
  22. PastaPastaPasta referenced this in commit c5468fa294 on Jun 11, 2020
  23. 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-21 15:15 UTC

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