-
Notifications
You must be signed in to change notification settings - Fork 125
get_account_data() always returns empty result if there are no transactions #217
Comments
Related: #175 |
I was facing the same issue recently and I took my time to dig deeper into this. I found more problems. But also solutions :) On the most fundamental level, it boils down to defining the terms Therefore, in my opinion, in PyOTA there are currently the following problems that should be fixed:
In my opinion the definitions of
These definitions are snapshot resistant. The above commands would work in a consistent (an address is either in the state Of course, it is important to stay consistent with other IOTA libraries. Therefore I checked the behaviour of the JavaScript library. It seems that the JavaScript library, in general, follows the definitions I suggested above but there are one or two cases where this is not true. I think that this is more likely an unexpected behaviour than intentional design. Within the next days, I will open an issue in the JavaScript GitHub repository where I will document my findings of the JavaScript library and where we can discuss the behaviour that the client libraries should have. |
😻 Awesome analysis, thanks @pdecol ! |
Important: Co-ordinate this change with the other IOTA API libraries, to ensure behaviour remains consistent.
If there are no transactions for the generated addresses (e.g., after a snapshot),
get_account_data()
always returns an empty result, even if one or more of the generated addresses have a balance.This behaviour makes sense when specifying
get_account_data(stop=None, ...)
(the address generator would stop at the 0th address because there are no transactions), but it is not intuitive when specifying a value forstop
(see #212 for an example).The text was updated successfully, but these errors were encountered: