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

Conversation

@lzpap
Copy link
Collaborator

@lzpap lzpap commented Nov 28, 2019

This PR contains parts of #244

Details

So far only findTransactions check was made in iter_used_addresses and get_new_addresses.

With these changes, a used address becomes:

  • an address that has transaction(s) associated with it on the Tangle,
  • OR was ever spent from.

A new address becomes:

  • an address that has no transaction(s) associated with it on the Tangle,
  • AND was never spent from.

These changes are needed to achieve identical behavior with the JS lib.

Huge thanks to @pdecol, who did the initial implementation and pull request!

@lzpap lzpap added the bug label Nov 28, 2019
Copy link
Contributor

@todofixthis todofixthis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ minor questions/suggestions.

Comment on lines +950 to +951
# ``getInputs`` uses ``findTransactions`` and
# ``wereAddressesSpentFrom`` to identify unused addresses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ We didn't modify get_inputs.py in this PR — is this comment accurate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_inputs uses iter_used_addresses, which was modified according to this comment.

…new_addresses`

So far only `findTransactions` check was made in the the two
methods above, this changes is needed to achieve identical
behavior with the JS lib.

Based on @pdecol's implementation.
@lzpap lzpap force-pushed the pdecol_snapshot_pr_cleaned branch from 2073d3f to 3395a41 Compare December 2, 2019 09:31
@lzpap lzpap merged commit cd370a3 into iotaledger-archive:develop Dec 2, 2019
@lzpap lzpap deleted the pdecol_snapshot_pr_cleaned 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