CTxMemPool: consolidate two frequently-printed debug.log lines into one #1254

pull jgarzik wants to merge 2 commits into bitcoin:master from jgarzik:mempool-logging changing 1 files +4 −3
  1. jgarzik commented at 12:22 AM on May 11, 2012: contributor

    Previously, a single TX would trigger two log lines in quick succession,

        addUnchecked(): size 152
        CTxMemPool::accept() : accepted c4cfdd48b7
    

    After this change, only one log line is used:

        CTxMemPool::accept() : accepted 98885e65db (poolsz 26)
    
  2. CTxMemPool: consolidate two frequently-printed debug.log lines into one
    Previously, a single TX would trigger two log lines in quick succession,
    
            addUnchecked(): size 152
            CTxMemPool::accept() : accepted c4cfdd48b7
    
    After this change, only one log line is used:
    
            CTxMemPool::accept() : accepted 98885e65db (poolsz 26)
    133dce6a37
  3. CTxMemPool::accept(): do not log FetchInputs failure redundantly
    FetchInputs already logs failures internally.  This commit makes the logging
    more consistent with other FetchInputs callsites also.
    
    Prior to this commit, two log lines were logged for one condition:
    
         ERROR: FetchInputs() : de15fde415 mempool Tx prev not found a2c75da227
         ERROR: CTxMemPool::accept() : FetchInputs failed de15fde415
    
    After this commit, only one line is logged:
    
         ERROR: FetchInputs() : e0507ab2c7 mempool Tx prev not found 9a620262cd
    33a53bc13b
  4. jgarzik commented at 12:34 AM on May 11, 2012: contributor

    Added a second commit, which further quietens the logging, without losing information.

  5. sipa commented at 1:40 AM on May 11, 2012: member

    ACK

  6. Diapolo commented at 4:55 AM on May 11, 2012: none

    Small and good change ... btw. is our printf thread-safe? At least sometimes I get lines that show no date - time, although -logtimestamps is supplied as switch and others show it twice.

  7. sipa commented at 1:33 PM on May 11, 2012: member

    @Diapolo don't tell me we need a mutex for printf on windows...

  8. Diapolo commented at 1:34 PM on May 11, 2012: none

    @sipa I was just asking with nothing bad in my mind...

  9. jgarzik referenced this in commit 271f9faf9e on May 11, 2012
  10. jgarzik merged this on May 11, 2012
  11. jgarzik closed this on May 11, 2012

  12. coblee referenced this in commit a46688e097 on Jul 17, 2012
  13. jgarzik deleted the branch on Aug 24, 2014
  14. suprnurd referenced this in commit a42b375a05 on Dec 5, 2017
  15. lateminer referenced this in commit cc547e7927 on May 6, 2020
  16. DrahtBot locked this on Sep 8, 2021
Contributors

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-20 00:16 UTC

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