fn should_forward_error_from_csp() {
        let dkg_config = dkg_config(NiDkgConfigData {
            receivers: set_of(&[NODE_1]),
            ..minimal_dkg_config_data_without_resharing()
        });
        let csp = csp_with_create_dealing_returning(Err(malformed_fs_pk()));

        let error = create_dealing(
            &NODE_1,
            &csp,
            &registry_with_records(vec![dealing_enc_pk_record(NODE_1, REG_V2, PK_VALUE_1)]),
            &dkg_config,
        )
        .unwrap_err();

        assert_eq!(
            error,
            DkgCreateDealingError::MalformedFsEncryptionPublicKey(MalformedFsEncryptionPublicKeyError {
                internal_error: "error for receiver index 0: MalformedPublicKeyError { algorithm: Placeholder, key_bytes: None, internal_error: \"some error\" }".to_string()
            })
        );
    }
// We only smoke test this on a single error variant.
We only smoke test this on a single error variant.
We only smoke test this on a single error variant .
fn should_forward_error_from_csp() {
        let dkg_config = dkg_config(NiDkgConfigData {
            receivers: set_of(&[NODE_1]),
            ..minimal_dkg_config_data_without_resharing()
        });
        let csp = csp_with_create_dealing_returning(Err(malformed_fs_pk()));
        let error = create_dealing(
            &NODE_1,
            &csp,
            &registry_with_records(vec![dealing_enc_pk_record(NODE_1, REG_V2, PK_VALUE_1)]),
            &dkg_config,
        )
        .unwrap_err();
        assert_eq!(
            error,
            DkgCreateDealingError::MalformedFsEncryptionPublicKey(MalformedFsEncryptionPublicKeyError {
                internal_error: "error for receiver index 0: MalformedPublicKeyError { algorithm: Placeholder, key_bytes: None, internal_error: \"some error\" }".to_string()
            })
        );
    }
fn should_forward_error_from_csp ( ) { let dkg_config = dkg_config ( NiDkgConfigData { receivers : set_of ( & [ NODE_1 ] ) , .. minimal_dkg_config_data_without_resharing ( ) } ) ; let csp = csp_with_create_dealing_returning ( Err ( malformed_fs_pk ( ) ) ) ; let error = create_dealing ( & NODE_1 , & csp , & registry_with_records ( vec ! [ dealing_enc_pk_record ( NODE_1 REG_V2 PK_VALUE_1 ) ] ) , & dkg_config , ) . unwrap_err ( ) ; assert_eq ! ( error DkgCreateDealingError MalformedFsEncryptionPublicKey ( MalformedFsEncryptionPublicKeyError { internal_error " \" \" " to_string ( ) } ) ) ; }
We only smoke test this on a single error variant.
We only smoke test this on a single error variant .