Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: dave111223 on May 31, 2013, 03:36:33 AM



Title: Bitcoin-qt JSON
Post by: dave111223 on May 31, 2013, 03:36:33 AM
I'm trying to determine what data is actually stored in the blockchain.

If I want to lookup a transaction that occurred 3 months ago (assuming the transaction did not involve addresses within my wallet), can I?

For example:

Code:
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://myuser:mypass@127.0.0.1:8332/');
 
  print_r($bitcoin->gettransaction('65e5469feca4d0cb11dad590500b39a563a3846bea93ed3f979c7cc7311197e7'));


This returns nothing; this function only seems to return transactions that involve my addresses.


Title: Re: Bitcoin-qt JSON
Post by: dserrano5 on May 31, 2013, 06:45:49 AM
You need to run bitcoin with the parameter -txindex=1 and then you'll be able to getrawtransaction on any txid.


Title: Re: Bitcoin-qt JSON
Post by: dave111223 on May 31, 2013, 07:24:40 AM
Thanks worked.

Do you know if it's possible to lookup transaction by address?


Title: Re: Bitcoin-qt JSON
Post by: dserrano5 on May 31, 2013, 05:02:30 PM
Do you know if it's possible to lookup transaction by address?

There's no way that I know of. Addresses don't exist at such a low level.