Tracking transactions in both directions

0

0

I have an example of a transaction. I deleted some fields which don't play any role for my question. Also I reduced large hashes and IDs.

{
 "txid": "8d554",
  "vin": [
    {
      "txid": "d3117",
      "vout": 0
    }
  ],
  "vout": [
    {
      "value": 1.99995000,"address":"mrL8SS",
      "n": 0
    }, 
    {
      "value": 3.00000000, "address":"mtK8r",
      "n": 1
    }
  ]
}

From this transaction I can find out which transaction was used for paying outputs of this transaction. Because those transaction is in vin field. Its txID is d3117. So if I want i will be able to find this transaction by using bitcoin client RPC API: bitcoin-cli gettransaction d3117. But what if i want to find out, which transaction used THIS transaction as input? Could you guys please tell me, if it's possible or not?

Максим Алексеев

Posted 2017-12-21T22:31:17.440

Reputation: 3

Answers

0

That's not possible without looking through all the transactions after this one and finding the one which spent it. Most block explorers keep a database of the transactions so you could look it up on one of them.

MeshCollider

Posted 2017-12-21T22:31:17.440

Reputation: 8 735

I really was hoping that there was some way to do that. Well, thank you very much for answering anyway!Максим Алексеев 2017-12-22T00:24:47.713