Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add properties to test change address generation #198

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Apr 30, 2019

Issue Number

#95

Overview

  • I have added a few properties to test change address generation

Comments

@KtorZ KtorZ requested a review from akegalj April 30, 2019 11:01
@KtorZ KtorZ self-assigned this Apr 30, 2019
(property prop_nextChangeAddressGap)
it "After `gap` change addresses, the same one are yield in reverse order"
(property prop_changeAddressRotation)
it "Can generate new change addresses after discovering a pending one"
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't wrap my head around this property. So after pending address is discovered we should be able to generate a new change address.

In other words - it shouldn't be the case that we have a pending address and we are unable to generate a new change address. What would be the constrain to generate a new change address - is it only a pool gap ?

Copy link
Member Author

Choose a reason for hiding this comment

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

it shouldn't be the case that we have a pending address and we are unable to generate a new change address

It's actually the case. For the internal chain, we are actually free to do whatever we want. However, we do want to keep all information we need onto the blockchain (to not impede the wallet's portability) so, we've chosen to also track change addresses using an address pool gap (which is a choice consistent with Yoroi...). As a consequence, we can't generate change addresses outside of the gap. Still, when we discover an address that was pending, we now that the pool has extended and therefore, there are new addresses that we can now generate.

@KtorZ KtorZ force-pushed the KtorZ/95/change-address-generation-testing branch from ef18683 to fa9612a Compare April 30, 2019 14:36
@KtorZ KtorZ merged commit 4d5475c into master Apr 30, 2019
@KtorZ KtorZ deleted the KtorZ/95/change-address-generation-testing branch April 30, 2019 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants