6
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?).
What am I missing here?
As the author of the patch that introduced this command, +1. This is the right answer. (See my comment on GitHub 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 – 2016-03-08T02:50:25.923