1

I want to get the input addresses of a transaction with a known id. If I use getrawtransaction I get something like:

"vin" : [
{
"txid" : "470a499101b7042b225dab4f15fa252cdc7f3a16153e33d66d0c8c53b1d83aaa",
"vout" : 1,
"scriptSig" : {
"asm" : "304502206917b333161de796bed7770615ebf66669092a53877b3dba2582bad7dfc0b56c022100f9926a5e82d15666122b1f8703d94116eec0c98ddbf922a72467b05953532e1a01 03864670304932f91c85f38e80aebcd6c37fa36529b7135f7fa21b36585df5ab49",
"hex" : "48304502206917b333161de796bed7770615ebf66669092a53877b3dba2582bad7dfc0b56c022100f9926a5e82d15666122b1f8703d94116eec0c98ddbf922a72467b05953532e1a012103864670304932f91c85f38e80aebcd6c37fa36529b7135f7fa21b36585df5ab49"
},

If I want to further look of the transaction 470a499101b7042b225dab4f15fa252cdc7f3a16153e33d66d0c8c53b1d83aaa with getrawtransaction I get a: "No information availabe about transaction (code -5)"

So is it at all possible to get the input addresses of a random transaction (not belonging to your wallet) with bitcoind?

1

You need to pass the option -txindex=1 at the command line, or include txindex=1 in bitcoin.conf.

  • and than I can look up transactions where all outputs are already spend, right? – user599464 Apr 9 '15 at 14:29
1

Yes, you can. Open bitcoind with -txindex=1 If you didn't use txindex=1, you might need to add -reindex to recreate transactions indice. Therefore, you can use getrawtransaction to look up spent transactions which are not belonging to you.

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.