FuzzyBearBTC / PeercoinBlockExplorer

Peercoin Block Chain Viewer - written in php and used JSON RPC calls
http://blockexplorer.peercointalk.org/
6 stars 32 forks source link

changed api call to search by txid #26

Closed Radar-Hazmat closed 10 years ago

Radar-Hazmat commented 10 years ago

Bitcoin's api call "getrawtransaction" is called "gettransaction" in Peercoin.

In bc_daemon.php: changed method name from "getwartransaction" to "gettransaction" removed $verbose parameter

In bc_layout.php:

*changed the data shown in the transaction report to reflect differences in returned JSON data between Peercoin's "gettransaction" and Bitcoin's "getrawtransaction." In particular "vin" and "vout" are no longer shown when you search via txid.

FuzzyBearBTC commented 10 years ago

I put up a version of your code with your changes live on http://blockexplorer.peercointalk.org/ but still get errors when searching for transaction IDs

gettransaction:Invalid or non-wallet transaction id(Error Code: -5)

this is because the gettransaction only searches for transactions on the wallet i thought not the whole blockchain.

Radar-Hazmat commented 10 years ago

I was afraid of this. I asked about this on peercointalk here: Peercoin0.3.2 RPC gettransaction returning error

Essentially the answer ppcman gives is that the complete transaction data is not kept in the wallet database because it is too large. Blockchain explorers keep their own database of all transactions they see on the network.