I am trying to understand if there a unique identifier for transactions. I didn't find anything about that mentioned in listsinceblock's help.

  "involvesWatchonly": true,
  "account": "",
  "address": "mvd6qFeVkqH6MNAS2Y2cLifbdaX5XUkbZJ",
  "category": "receive",
  "amount": 10,
  "label": "",
  "confirmations": 69,
  "blockhash": "62967ce950fc03b14179e58f42e426b63cbfbf63c2b9e59acb6a719a09c23b94",
  "blockindex": 58,
  "blocktime": 1524872287278,
  "txid": "aac9b2d7bb7b3476a83a5ac0c2fe21625bcd961ed43a5c5fd3eacf6536dc81d5",
  "vout": 7,
  "walletconflicts": [],
  "time": 1524872276635,
  "timereceived": 1524872276635,
  "bip125-replaceable": "no"
  • What do you mean by "unique key of transactions over time"? listsinceblock does not tell you how many transactions occurred over a given amount of time, it only tells you what transactions and you can then calculate it yourself.
    – Andrew Chow
    May 14 '18 at 23:35
  • @AndrewChow if I do 2 calls or listsinceblock I want not to count the same transaction twice.
    – 0x90
    May 14 '18 at 23:36
  • RPC calls are stateless, they do not remember the last time you made that call and do not do anything related to "time since last RPC call". The only way to avoid counting the same transaction twice is to just use the hash of the block that was found after your last call to listsinceblock
    – Andrew Chow
    May 14 '18 at 23:37
  • @AndrewChow that's why I need to take care of it. Then I want a unique identifier
    – 0x90
    May 14 '18 at 23:38

Each transaction has a unique identifier which is the txid. It is the hash of the transaction and each transaction's hash is unique.

  • 1
    No, one txid can cause multiple entries in the list* RPCs. You need to also include "vout" to have a unique key. Nov 1 '18 at 4:42
  • @PieterWuille what is considered a valid "receive" transaction from listsinceblock that I would about to credit? If say same txid occurs in 2 transactions but with different vout, should both transactions be credited? What if 2 transactions have same txid and vout? Thank you
    – daniel
    Jan 18 at 19:00
  • Yes you should credit both. The same txid/vout combination can't appear multiple times. Jan 18 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.