ZenGo-X / multi-party-ecdsa

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
GNU General Public License v3.0
975 stars 308 forks source link

`t` and `n` should not be usize #72

Closed kigawas closed 4 years ago

kigawas commented 5 years ago

usize in Rust is for something related with memory address offset, not for counting number.

Ref: https://users.rust-lang.org/t/i32-vs-isize-u32-vs-usize/22657/2

kigawas commented 5 years ago

Suggest using u16 or u32 here

omershlo commented 5 years ago

good catch, I think I repeatedly made this mistake. https://github.com/KZen-networks/multi-party-ecdsa/commit/9c1121ab9db37a58d4ee8979356454e680619a76 I changed it on my branch - can you please review ?

kigawas commented 5 years ago

LGTM I suggest merging #71 first