BitShares Forum

Main => Technical Support => Topic started by: sharique-knysys on March 03, 2016, 01:34:38 pm

Title: Get Particular Transaction
Post by: sharique-knysys on March 03, 2016, 01:34:38 pm
Hi,

I want to track particular transaction. I used get_transaction and get_recent_transaction_by_id from database api but didn't get response. Is there any method in database api or in wallet api which can provide me details of particular transaction?
Title: Re: Get Particular Transaction
Post by: xeroc on March 03, 2016, 02:28:20 pm
https://bitshares.org/doxygen/classgraphene_1_1app_1_1database__api.html#ac1475ae15f2b5398a08a68d067051e92

get recent_transaction_by_id will not look over ALL transaction in the blockchain but only recent ones.

https://bitshares.org/doxygen/classgraphene_1_1app_1_1database__api.html#ae1d1fc757dc2f658466c258fb70dd84c
does not search for a particular transaction but can give you a transaction provided a block id and the index of that transaction in that block

you might want to look into broadcast_transaction_with_callback
https://bitshares.org/doxygen/classgraphene_1_1app_1_1network__broadcast__api.html#a67737f03620587eed68b91184c753c2e
to get notified via websockets once your transaction gets included in a block
Title: Re: Get Particular Transaction
Post by: abit on March 04, 2016, 01:28:53 pm
Or build you own external transaction database like cryptofresh.com did.

Currently Graphene doesn't use an on-disk transaction cache, so transactions would be dropped in certain (rare) case. A 3rd application should cache the transaction it generated until it's included in the blockchain or expired, sometimes need to re-broadcast it.