<p>As per: <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="noreferrer">https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list</a></p>

<p>We have,</p>

<blockquote>
  <p>[target-confirmations] intentionally does not affect the list of returned transactions, but only affects the returned 'lastblock' value.</p>
</blockquote>

<p>What does this mean? It means the <code>lastblock</code> entry in your returned object is the last block you can see on the blockchain (as it the block that currently has exactly 1 confirmation as indicated by the argument you passed in). The <code>lastblock</code> entry is the only field you can affect by changing the <code>target-confirmations</code> argument.</p>

<p>This means that if you want all transactions with at least 1 confirmation, you need to filter this list. This begs the question, why isn't the <code>target-confirmations</code> argument used to do this filtering?</p>

<p>This is because the way the function works currently allows for a use-case in which you can constantly call <code>listsinceblock</code> with the value of <code>lastblock</code> that was returned in your last call. By doing this, your <code>transactions</code> list will contain transactions that reach X or more confirmations on the blockchain in <em>exactly</em> one of those calls, (where X in this case is 1).</p>

CC BY-SA 3.0
2016-03-08T02:50:25.923Z
As the author of the patch that introduced this command, +1. This is the right answer. (See [my comment on GitHub](https://github.com/bitcoin/bitcoin/pull/199#issuecomment-1514952) clarifying the rationale.) The point is to allow your application to become aware of transactions below your confirmation target (maybe you display them as unconfirmed to your user) but still notice when they *reach* that target later.
cdhowie
CC BY-SA 3.0
2014-06-26T09:33:43.493Z
2014-06-26T09:33:43.493Z
Max Steele
<p><code>listsinceblock help</code> returns:</p>

<pre><code>listsinceblock ( "blockhash" target-confirmations )

Get all transactions in blocks since block [blockhash], or all transactions if omitted

Arguments:
1. "blockhash"   (string, optional) The block hash to list transactions since
2. target-confirmations:    (numeric, optional) The confirmations required, must be 1 or more
</code></pre>

<p>I sent a coin to my wallet and a few seconds later I executed <code>listsinceblock 1</code>. My transaction was just broadcasted so it had 0 confirmations, as expected. Note the <code>target-confirmations</code> parameter above which must be greater than 0 no matter what. </p>

<p>So for my test I executed <code>bitcoin-cli listsinceblock 0000000008eb5d53efbb39d2cb9f595e5bd567c295936de5c2282bbb8ef46cf0 1</code> which returned:</p>

<pre><code>{
    "transactions" : [
        {
            "account" : "",
            "address" : "mzE6DJMHPghYpVg4GCurMbxSSXBfW1KCFH",
            "category" : "receive",
            "amount" : 1.00000000,
            "confirmations" : 0,
            "txid" : "917248d57293a7fd3a88aa3a26026d2e4d6a1d4eef898519b20419f2339c265c",
            "walletconflicts" : [
            ],
            "time" : 1399200157,
            "timereceived" : 1399200157
        }
    ],
    "lastblock" : "0000000004ba22e9f8cea2e843b34f7eeaa2c3b7004ddcf19bfd8af0215fc0cc"
}
</code></pre>

<p>Note that the above transaction has 0 confirmations, however listsinceblock is supposed to operate beyond 1 confirmations (which is weird, as I am polling <code>listsinceblock</code> to get new transactions that are always unconfirmed, after Gavin's tip on: <a href="https://bitcoin.stackexchange.com/questions/1725/how-to-know-there-is-a-new-transaction">How to know there is a new transaction?</a>).</p>

<p>What am I missing here?</p>

<bitcoind><json-rpc><confirmations>
listsinceblock parameter: target-confirmations
Doug Peters
# listsinceblock parameter: target-confirmations

(Asked by: username_0 on 2014-05-04)

`listsinceblock help` returns:

```
listsinceblock ( "blockhash" target-confirmations )

Get all transactions in blocks since block [blockhash], or all transactions if omitted

Arguments:
1. "blockhash"   (string, optional) The block hash to list transactions since
2. target-confirmations:    (numeric, optional) The confirmations required, must be 1 or more

```

I sent a coin to my wallet and a few seconds later I executed `listsinceblock 1`. My transaction was just broadcasted so it had 0 confirmations, as expected. Note the `target-confirmations` parameter above which must be greater than 0 no matter what.

So for my test I executed `bitcoin-cli listsinceblock 0000000008eb5d53efbb39d2cb9f595e5bd567c295936de5c2282bbb8ef46cf0 1` which returned:

```
{
    "transactions" : [
        {
            "account" : "",
            "address" : "mzE6DJMHPghYpVg4GCurMbxSSXBfW1KCFH",
            "category" : "receive",
            "amount" : 1.00000000,
            "confirmations" : 0,
            "txid" : "917248d57293a7fd3a88aa3a26026d2e4d6a1d4eef898519b20419f2339c265c",
            "walletconflicts" : [
            ],
            "time" : 1399200157,
            "timereceived" : 1399200157
        }
    ],
    "lastblock" : "0000000004ba22e9f8cea2e843b34f7eeaa2c3b7004ddcf19bfd8af0215fc0cc"
}

```

Note that the above transaction has 0 confirmations, however listsinceblock is supposed to operate beyond 1 confirmations (which is weird, as I am polling `listsinceblock` to get new transactions that are always unconfirmed, after Gavin's tip on: [How to know there is a new transaction?](https://bitcoin.stackexchange.com/questions/1725/how-to-know-there-is-a-new-transaction)).

What am I missing here?

**Tags:** bitcoind, json-rpc, confirmations


---

## 1 answers

### Answer by username_1 on 2014-06-26. Score: 6

As per: <https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list>

We have,

> [target-confirmations] intentionally does not affect the list of returned transactions, but only affects the returned 'lastblock' value.

What does this mean? It means the `lastblock` entry in your returned object is the last block you can see on the blockchain (as it the block that currently has exactly 1 confirmation as indicated by the argument you passed in). The `lastblock` entry is the only field you can affect by changing the `target-confirmations` argument.

This means that if you want all transactions with at least 1 confirmation, you need to filter this list. This begs the question, why isn't the `target-confirmations` argument used to do this filtering?

This is because the way the function works currently allows for a use-case in which you can constantly call `listsinceblock` with the value of `lastblock` that was returned in your last call. By doing this, your `transactions` list will contain transactions that reach X or more confirmations on the blockchain in *exactly* one of those calls, (where X in this case is 1).

> **Comments:**
> **username_2**: As the author of the patch that introduced this command, +1. This is the right answer. (See [my comment on GitHub](https://github.com/bitcoin/bitcoin/pull/199#issuecomment-1514952) clarifying the rationale.) The point is to allow your application to become aware of transactions below your confirmation target (maybe you display them as unconfirmed to your user) but still notice when they *reach* that target later.  

---

