4

According to pyota library, it states that get_bundles() may return multiple bundles with a specific transaction hash. But even we replay/reattach the bundle, its transactions' hash will change. I wonder in which circumstance it is possible to return list of matching bundles with one transaction only?

2

In the original API Proposal, it mentions that getBundle() may return multiple bundles:

If there are multiple bundles (because of a replay for example), it will return multiple bundles.

When I implemneted PyOTA, I used the API Proposal to design the interface, and I based the implementation off of the iota.lib.js library.

At the time, the JS getBundle() method always returned a single bundle regardless of circumstances, so I didn't know how to make PyOTA's get_bundles() method return multiple bundles, but I still wanted to keep the interface flexible for when that functionality was finally implemented.

However, it appears that this functionality has been definitively dropped; the API Proposal hasn't been updated in nearly 2 years, and in the most recent version of iota.js, the getBundle() method is still documented as always returning a single bundle.

It might be worthwhile to add something to the PyOTA issue tracker to reconcile this disparity with the JS lib.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.