magic-wormhole / magic-wormhole.rs

Rust implementation of Magic Wormhole, with new features and enhancements
European Union Public License 1.2
754 stars 80 forks source link

[BUG] Wormhole completion suggestion seems to get wrong wordlist #269

Open kernelPanic0x opened 7 hours ago

kernelPanic0x commented 7 hours ago

Since i changed from all words to even and odd wordlist, i think i missed something with the even and odd selection 👀. Why is the first word odd? Shouldn't it be even? Because the get_wordlist fn gets even as first wordlist and i reused it from the original code that was there. Should we swap vec![even_words, odd_words] so that it is inverted or should we change the get_wordlist so it gets the correct wordlist there? I think the first word should be even not odd right?

kernelPanic0x commented 6 hours ago

https://github.com/magic-wormhole/magic-wormhole.rs/blob/main/src/core/wordlist.rs#L125-L138

even_wordlist shoud have index 0 or not? Should we change that?