listsinceblock `target-confirmations` param seems broken #1153

issue freewil opened this issue on April 27, 2012
  1. freewil commented at 4:20 AM on April 27, 2012: contributor

    The second param of listsinceblock appears to be broken as it doesn't seem to affect the output for my scenario.

    Here's some example output from a private testnet:

    $ bitcoind -datadir=1 listsinceblock 00000000e1ca9ecc09bbcd03c0c2d208424e09af13f1cc7772aebf5db8268112

    {
        "transactions" : [
            {
                "account" : "",
                "category" : "immature",
                "amount" : 50.00000000,
                "confirmations" : 1,
                "blockhash" : "00000000a2638ab449ccc10a3af88c27144a90c6db8f0ba30316b4a24064512a",
                "blockindex" : 0,
                "txid" : "c7a498a50d7cd8af1c6f5e1446772dd0575d1f4472524634229bb0b05caa488b",
                "time" : 1335499077
            }
        ],
        "lastblock" : "00000000a2638ab449ccc10a3af88c27144a90c6db8f0ba30316b4a24064512a"
    }
    

    Everything appears to be ok there, now if you set the second param, target-confirmations to 2, you would expect that transaction to not appear:

    bitcoind -datadir=1 listsinceblock 00000000e1ca9ecc09bbcd03c0c2d208424e09af13f1cc7772aebf5db8268112 2

    {
        "transactions" : [
            {
                "account" : "",
                "category" : "immature",
                "amount" : 50.00000000,
                "confirmations" : 1,
                "blockhash" : "00000000a2638ab449ccc10a3af88c27144a90c6db8f0ba30316b4a24064512a",
                "blockindex" : 0,
                "txid" : "c7a498a50d7cd8af1c6f5e1446772dd0575d1f4472524634229bb0b05caa488b",
                "time" : 1335499077
            }
        ],
        "lastblock" : "00000000e1ca9ecc09bbcd03c0c2d208424e09af13f1cc7772aebf5db8268112"
    }
    
  2. olhovsky commented at 1:05 PM on August 9, 2012: none

    I'm observing the same behavior. (In 0.6.3.)

  3. jlherren commented at 12:18 AM on January 25, 2014: none

    FWIW, I would like to point out that the second parameter is likely to be misunderstood and definitely insufficiently documented (at least on the bitcoin wiki, which points to this bug). cdhowie who implemented this feature points it out clearly: "Note that the second parameter does not in any way affect which transactions are returned". Read the rest of his comment, which explains it very nicely at #199 (comment)

  4. cdhowie commented at 9:34 PM on April 2, 2014: contributor

    I have updated the wiki to no longer incorrectly link to this bug and to explain what the parameter does. I would recommend that this issue be closed since it does not document any actual bug.

  5. laanwj closed this on Apr 2, 2014

  6. laanwj commented at 10:06 PM on April 2, 2014: member

    Thanks @cdhowie

  7. suprnurd referenced this in commit 785adad57e on Dec 5, 2017
  8. lateminer referenced this in commit bb1af5305d on Jan 22, 2019
  9. dexX7 referenced this in commit 19c82e5399 on Aug 20, 2020
  10. 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-05-03 03:16 UTC

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