Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

listsinceblock `target-confirmations` param seems broken #1153

Closed
freewil opened this Issue · 4 comments

5 participants

@freewil

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"
}
@olhovsky

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

@jlherren

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)

@cdhowie

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.

@laanwj laanwj closed this
@laanwj
Owner

Thanks @cdhowie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.