Every use of `getinfo` or `getwalletinfo` logs two wallet messages #7794

issue laanwj opened this issue on April 3, 2016
  1. laanwj commented at 10:35 AM on April 3, 2016: member

    I'm not sure if it was always the case, or whether it signifies an underlying problem, but it is weird:

    2016-04-03 10:34:10 keypool reserve 1
    2016-04-03 10:34:10 keypool return 1
    
  2. laanwj added the label Wallet on Apr 3, 2016
  3. laanwj added the label RPC/REST/ZMQ on Apr 3, 2016
  4. sipa commented at 10:37 AM on April 3, 2016: member

    It loads a reserve key in order to check its timestamp. We should really provide a wallet function that computes that without that, though...

  5. jonasschnelli commented at 6:04 PM on April 3, 2016: contributor

    https://github.com/bitcoin/bitcoin/blob/0.12/src/wallet/wallet.cpp#L2569 -> It reserves a keypool key and returns it immediately (after getting its time). This is kind of ineffective because there are db operations included.

    Why not accessing setKeyPool.begin().nTime while holding cs_wallet directly?

  6. laanwj commented at 9:10 AM on April 4, 2016: member

    Why not accessing setKeyPool.begin().nTime while holding cs_wallet directly?

    Good idea, but let's wrap that in a CWallet method.

  7. paveljanik commented at 8:27 AM on April 6, 2016: contributor

    The same happens when you use getnewaddress.

  8. laanwj commented at 12:41 PM on April 6, 2016: member

    Well with getnewaddress you'd expect a keypool line to be reserved (but not returned).

  9. laanwj commented at 10:44 AM on April 28, 2016: member

    Closing after #7816 merged which solves this.

  10. laanwj closed this on Apr 28, 2016

  11. MarcoFalke 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-13 15:15 UTC

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