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

[minor issue] Index button of the previous addresses is not correct? #283

Closed
aglkm opened this issue Nov 15, 2023 · 4 comments
Closed

[minor issue] Index button of the previous addresses is not correct? #283

aglkm opened this issue Nov 15, 2023 · 4 comments

Comments

@aglkm
Copy link
Contributor

aglkm commented Nov 15, 2023

Shouldn't we need to correct the index of the previous addresses?

Change the following:

def list_address_type(self, addr_type=0):
...
"%d..%d" % (num_checked - max_addresses, num_checked),

to:

"%d..%d" % (num_checked - max_addresses + 1, num_checked),

krux_issue01

@jdlcdl
Copy link
Collaborator

jdlcdl commented Nov 15, 2023

Just here to chime in that "Index starts at 0... while Numbers start at 1". I'm sort of making that up... but just for consistency and terminology, "index" sounds computer-ish so that I remember it starts at 0, and "number" sounds human so that we start counting at 1. It's growing on me that the first address (with a derivation path that ends in /0) is "1."

... and I agree with @aglkm above!

@odudex
Copy link
Member

odudex commented Nov 15, 2023

Good catch! Wouldn't you like to make a PR?
I think we should keep the numbers, starting at 1, as we also refer to as first, second address etc. and just make the change @aglkm suggested.

@aglkm
Copy link
Contributor Author

aglkm commented Nov 15, 2023

Sure. I will add a PR tomorrow.

@aglkm
Copy link
Contributor Author

aglkm commented Nov 16, 2023

Code changes added here odudex#36

@aglkm aglkm closed this as completed Nov 16, 2023
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

No branches or pull requests

3 participants