pub fn check_threshold(
accounts: &[&AccountView],
threshold: u8,
) -> ProgramResultExpand description
Require at least threshold of the provided accounts to be signers.
Also checks that all accounts have unique addresses to prevent the duplicate-signer attack (passing the same signer key in multiple slots).
Returns MissingRequiredSignature if fewer than threshold are signers.
Returns InvalidArgument if duplicate addresses are found.