iota.py icon indicating copy to clipboard operation
iota.py copied to clipboard

Make invalid bundle handling in `get_account_data` configurable

Open todofixthis opened this issue 7 years ago • 0 comments

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 an InvalidBundle object in the result. This object is a container that holds the Bundle and exception objects.
  • errors='ignore': Any bundle that fails validation is silently dropped from the result.

todofixthis avatar Jun 04 '18 20:06 todofixthis