iota.py
iota.py copied to clipboard
Make invalid bundle handling in `get_account_data` configurable
Once an invalid transaction gets broadcast, it is very difficult to remove it from the Tangle. This can effectively prevent a client from using the get_account_data() command (see #178 ).
Proposed workaround: Add an errors argument to get_account_data() that behaves similarly to encode() and decode():
-
errors='strict'(default): Raise an exception if any bundle fails validation (this is the current behaviour). -
errors='replace': Any bundle that fails validation is replaced by anInvalidBundleobject in the result. This object is a container that holds theBundleand exception objects. -
errors='ignore': Any bundle that fails validation is silently dropped from the result.