wallet: do not spam about non-existent spk managers #22334

pull S3RK wants to merge 1 commits into bitcoin:master from S3RK:stop_non_existing_spkman_spam changing 1 files +0 −1
  1. S3RK commented at 6:41 am on June 24, 2021: member

    Avoid spam in logs during loadwallet, listdescriptors and probably other commands as well.

    loadwallet Before:

     02021-06-24T06:31:45Z init message: Loading wallet
     12021-06-24T06:31:45Z [desc] Wallet File Version = 169900
     22021-06-24T06:31:45Z [desc] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
     32021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 0 does not exist
     42021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 1 does not exist
     52021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 2 does not exist
     62021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 0 does not exist
     72021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 1 does not exist
     82021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 2 does not exist
     92021-06-24T06:31:45Z [desc] Wallet completed loading in             197ms
    102021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 0 does not exist
    112021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 1 does not exist
    122021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 2 does not exist
    132021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 0 does not exist
    142021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 1 does not exist
    152021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 2 does not exist
    162021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 0 does not exist
    172021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 1 does not exist
    182021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 2 does not exist
    192021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 0 does not exist
    202021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 1 does not exist
    212021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 2 does not exist
    222021-06-24T06:31:45Z [desc] setKeyPool.size() = 0
    232021-06-24T06:31:45Z [desc] mapWallet.size() = 0
    242021-06-24T06:31:45Z [desc] m_address_book.size() = 0
    252021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 0 does not exist
    262021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 1 does not exist
    272021-06-24T06:31:45Z [desc] External scriptPubKey Manager for output type 2 does not exist
    282021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 0 does not exist
    292021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 1 does not exist
    302021-06-24T06:31:45Z [desc] Internal scriptPubKey Manager for output type 2 does not exist
    31{
    32  "name": "desc",
    33  "warning": ""
    34}
    

    After:

     02021-06-24T06:26:58Z init message: Loading wallet
     12021-06-24T06:26:58Z [desc] Wallet File Version = 169900
     22021-06-24T06:26:58Z [desc] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
     32021-06-24T06:26:58Z [desc] Wallet completed loading in             158ms
     42021-06-24T06:26:58Z [desc] setKeyPool.size() = 0
     52021-06-24T06:26:58Z [desc] mapWallet.size() = 0
     62021-06-24T06:26:58Z [desc] m_address_book.size() = 0
     7{
     8  "name": "desc",
     9  "warning": ""
    10}
    
  2. fanquake added the label Wallet on Jun 24, 2021
  3. DrahtBot added the label Needs rebase on Jun 24, 2021
  4. jonatack commented at 2:22 pm on June 24, 2021: member
    Concept ACK
  5. practicalswift commented at 2:55 pm on June 26, 2021: contributor
    Concept ACK: we should avoid spamming the default log using LogPrintf
  6. theStack commented at 8:12 pm on June 28, 2021: member
    Concept ACK
  7. wallet: do not spam about non-existent spk managers 6084d2caed
  8. S3RK force-pushed on Jun 29, 2021
  9. DrahtBot removed the label Needs rebase on Jun 29, 2021
  10. achow101 commented at 6:25 pm on June 29, 2021: member
    I think that it is still useful to log this information once. It’s useful for debugging wallet issues to know what spkmans are available to the wallet. Perhaps we can add another log line WalletBatch::LoadWallet containing this information.
  11. S3RK commented at 6:58 am on June 30, 2021: member

    Active spk managers are logged already from CWallet::LoadActiveScriptPubKeyMan like so

     02021-06-30T06:54:48Z init message: Loading wallet
     12021-06-30T06:54:48Z [test2] Setting spkMan to active: id = 103bfd1f5080799f7b453bf401c6659df5a9cfd5b3edef85c117788d57c39e64, type = 0, internal = 0
     22021-06-30T06:54:48Z [test2] Setting spkMan to active: id = 9213dc6fd9d768d5a1cd1280339ea9457071cf4626ba1b0c8eb37d0995390bfc, type = 1, internal = 0
     32021-06-30T06:54:48Z [test2] Setting spkMan to active: id = 83732db7350e6e62e4bc305845bf25419811dd1f1baa9cc08f2c2f21371e8c76, type = 2, internal = 0
     42021-06-30T06:54:48Z [test2] Setting spkMan to active: id = b4287a0c00459077db00780d77c3dabfce3432f49cdc645e8e65242b62cf4f84, type = 0, internal = 1
     52021-06-30T06:54:48Z [test2] Setting spkMan to active: id = c4c767db2ae9e61fbdb39ef449104896639b0a0cf8d1e2aa56a472be754a7080, type = 1, internal = 1
     62021-06-30T06:54:48Z [test2] Setting spkMan to active: id = f5536f928bd394f1ae91956915f2de1020d9501d0584ba4314adfa1a49276e0b, type = 2, internal = 1
     72021-06-30T06:54:49Z [test2] Wallet File Version = 169900
     82021-06-30T06:54:49Z [test2] Keys: 6 plaintext, 0 encrypted, 0 w/ metadata, 6 total. Unknown wallet records: 0
     92021-06-30T06:54:49Z [test2] Wallet completed loading in             947ms
    102021-06-30T06:54:49Z init message: Rescanning
    112021-06-30T06:54:49Z [test2] Rescanning last 2 blocks (from block 0)...
    122021-06-30T06:54:49Z [test2] Rescan started from block 6c89bd3c030e18dfbde4e214d5cfe5789169b3e1a459e816a6dbbbcf82fd2023...
    132021-06-30T06:54:49Z [test2] Rescan completed in               3ms
    142021-06-30T06:54:49Z [test2] setKeyPool.size() = 6000
    152021-06-30T06:54:49Z [test2] mapWallet.size() = 0
    162021-06-30T06:54:49Z [test2] m_address_book.size() = 0
    17{
    18  "name": "test2",
    19  "warning": ""
    20}
    
  12. achow101 commented at 5:31 pm on June 30, 2021: member

    Oh right, we do have that.

    ACK 6084d2caed9b2c70c0f19898c33ecb141fe603c8

  13. fanquake commented at 2:11 am on July 1, 2021: member
    @S3RK I take it this is still relevant post #19651 / #21716 ?
  14. S3RK commented at 10:22 am on July 1, 2021: member

    @fanquake this still relevant.

    I was wrong when I said #19651 fixes #21716. It only fixes a part of it, the part addressed in #21880.

    This PR should fully address #21716

  15. fanquake merged this on Jul 1, 2021
  16. fanquake closed this on Jul 1, 2021

  17. sidhujag referenced this in commit 63390b7731 on Jul 1, 2021
  18. gwillen referenced this in commit 31c675389f on Jun 1, 2022
  19. DrahtBot locked this on Aug 16, 2022

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: 2024-12-18 21:12 UTC

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