When adding a new transaction, I get two "random" other transactions to use as my branch and trunk.
But if I have several transactions in a bundle, does each one get their own random two? Or should transaction 2 in the bundle reference transaction 1? And only the 0th transaction in the bundle uses real random not-this-bundle transactions?
Here are docs on the subject, but I'm not sure I'm understanding this right:
A unique feature of bundles is that the transactions are identified via the bundle hash, but also via the trunkTransaction . What this means is that the tail transaction (index 0), references in the trunkTransaction the transaction hash at index: 1 , index 1 references (and approves) index 2 and so on. This makes it possible to get the full bundle of transactions from just a tail transaction by traversing down the trunk transaction.