Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

fix: traverse_bundle checks for zero trytes #292

Merged
merged 1 commit into from
Jan 22, 2020

Conversation

lzpap
Copy link
Collaborator

@lzpap lzpap commented Jan 21, 2020

Solves: #291

Description

get_bundles calls traverseBundleCommand internally, which in turn calls getTrytesCommand to fetch the trytes for transactions in the bundle.

If a node doesn't have the trytes for a given transaction hash in its ledger, the value at the index of that transaction hash is either null or a string of 9s.

Therefore, getTrytesCommand doesn't return an empty list, rather a list with an empty transaction in it, meaning that all trytes of the transaction are '9's.

Detecting such cases when trying to fetch a bundle from the Tangle and throwing an exception.

If no tx was found, getTrytes returns all '9's.
Detecting such cases in traverse_bundle.
@lzpap lzpap added the bug label Jan 21, 2020
@lzpap lzpap merged commit 7635bb9 into iotaledger-archive:develop Jan 22, 2020
@lzpap lzpap deleted the get_bundles_no_tx_found branch January 28, 2020 10:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants