You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ListSinceBlock returns all transactions added in blocks since the specified
// block hash, or all transactions if it is nil, using the default number of
// minimum confirmations as a filter.
and
ListSinceBlockMinConf
// ListSinceBlockMinConf returns all transactions added in blocks since the
// specified block hash, or all transactions if it is nil, using the specified
// number of minimum confirmations as a filter.
However, that is wrong. The target-confirmation argument in to listsinceblock in bitcoin core does not affect the list of returned transactions, and is not a filter. What it does is only affect the field "lastblock" which btcrpcclient does not expose.
So actually ListSinceBlock and ListSinceBlockMinConf are both identical in btcrpcclient, and incorrectly say they filter the list.
I suggest that the docs get fixed, and the return type of ListSinceBlock and ListSinceBlockMinConf return a struct with a list of transaction and the last block (e.g. bitcoin core:
The reason I say it's dangerously wrong, as this can very easily lead to people accepting 0-conf transactions when they intended to filter to X confirmations.
davecgh
changed the title
ListSinceBlock and ListSinceBlockMinConf docs are dangerously wrong
rpcclient: ListSinceBlock and ListSinceBlockMinConf docs are dangerously wrong
Aug 16, 2017
From @FrozenPrincess on September 15, 2016 14:47
ListSinceBlock
and
ListSinceBlockMinConf
However, that is wrong. The
target-confirmation
argument in tolistsinceblock
in bitcoin core does not affect the list of returned transactions, and is not a filter. What it does is only affect the field "lastblock" which btcrpcclient does not expose.So actually ListSinceBlock and ListSinceBlockMinConf are both identical in btcrpcclient, and incorrectly say they filter the list.
I suggest that the docs get fixed, and the return type of
ListSinceBlock
andListSinceBlockMinConf
return a struct with a list of transaction and the last block (e.g. bitcoin core:The reason I say it's dangerously wrong, as this can very easily lead to people accepting 0-conf transactions when they intended to filter to X confirmations.
Copied from original issue: btcsuite/btcrpcclient#88
The text was updated successfully, but these errors were encountered: