Indeed, a bitcoinj wallet only stores transactions relevant to the
wallet so you usually can't trace back. Requesting ancestors from the
network also won't work because the Bitcoin protocol only allows this
for unconfirmed transactions.

You will need to build a database/an index of transactions. I'm not
sure, maybe a FullPrunedBlockStore can help here. I never investigated
really into the possibilities. Maybe Matt Corallo can help?


On 05/03/2016 10:52 PM, Rodrigo Acosta wrote:
> Hi everyone, I'm coming back to this great source of solutions after a
> lot of reading, but I'm stuck and can't find a better way of what I'm
> trying to do.
> 
> I'm trying to go back in transactions history until I reach a certain
> transaction.
> My problem applies to colored transaction and asset issuing but it
> doesn't have to be colored coins.
> 
> Suppose that:
> I know transaction D was originated from transaction A
> 
> (meaning Transaction A is colored and is Genesis Transaction,
> Transaction B was used to transfer color coin and used A as input,
> Transaction C was used to transfer color coin and used B as input,
> Transaction D was used to transfer color coin and used C as input).
> 
> If I received D, In my bitcoinj client with SPV blockchain I only have
> locally transaction D and C since I'm downloading dependencies.
> They only way I can reach to transaction A is by requesting to the peer
> I'm connected transaction B, find the dependency and then request
> transaction A?
> 
> I'm not able to find another way, and this approach may not work with
> hundreds of transactions in the middle.
> 
> I really appreciate anyones time in replying. thanks!
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to