Haven't thought this through at all, but we could declare a trait
trait RoundParams {
type FinalOutput;
type ShareId;
type PartyId;
const MAX_MSG_IN_LEN: usize;
// etc
}
and then replace all instances of <F, K, P, const MAX_MSG_IN_LEN: usize> with <P: RoundParams> and then refer to P::FinalOutput instead of F, etc. That's nice because we can change the type parameters at only one place and reduce boilerplate.
Haven't thought this through at all, but we could declare a trait
and then replace all instances of
<F, K, P, const MAX_MSG_IN_LEN: usize>
with<P: RoundParams>
and then refer toP::FinalOutput
instead ofF
, etc. That's nice because we can change the type parameters at only one place and reduce boilerplate._Originally posted by @ggutoski in https://github.com/axelarnetwork/tofn/pull/174#discussion_r720864768_