fn should_correctly_format_config_display_message() {
    let config = NiDkgConfig::new(valid_dkg_config_data());

    let display_text = format!("{}", config.unwrap());

    assert_eq!(display_text,
               "NiDkgConfig { \
                    dkg_id: NiDkgId { \
                        start_block_height: 1, \
                        dealer_subnet: yndj2-3ybaa-aaaaa-aaaap-yai, \
                        dkg_tag: HighThreshold, \
                        target_subnet: Local \
                        }, \
                    max_corrupt_dealers: 1, \
                    dealers: NiDkgDealers { dealers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                    max_corrupt_receivers: 1, \
                    receivers: NiDkgReceivers { receivers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                    threshold: NiDkgThreshold { threshold: 2 }, \
                    registry_version: 1, \
                    resharing_transcript: Some(NiDkgTranscript { \
                        dkg_id: NiDkgId { \
                            start_block_height: 2, \
                            dealer_subnet: fbysm-3acaa-aaaaa-aaaap-yai, \
                            dkg_tag: HighThreshold, \
                            target_subnet: Local \
                            }, \
                        threshold: NiDkgThreshold { threshold: 2 }, \
                        committee: NiDkgReceivers { receivers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                        registry_version: 2, \
                        internal_csp_transcript: Groth20_Bls12_381(Transcript { public_coefficients: PublicCoefficientsBytes { coefficients: [0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000] }, receiver_data: {} }) }) \
                        }"
    );
}
// This is explicitly tested since this appears in debug log messages. The
// message should be well readable and in particular contain hex encodings where
// applicable.
//
// The format of the subnet ids is specified in the interface spec:
// https://sdk.dfinity.org/docs/interface-spec/index.html#textual-ids
This is explicitly tested since this appears in debug log messages. The
message should be well readable and in particular contain hex encodings where
applicable.


This is explicitly tested since this appears in debug log messages . The message should be well readable and in particular contain hex encodings where applicable .
fn should_correctly_format_config_display_message() {
    let config = NiDkgConfig::new(valid_dkg_config_data());
    let display_text = format!("{}", config.unwrap());
    assert_eq!(display_text,
               "NiDkgConfig { \
                    dkg_id: NiDkgId { \
                        start_block_height: 1, \
                        dealer_subnet: yndj2-3ybaa-aaaaa-aaaap-yai, \
                        dkg_tag: HighThreshold, \
                        target_subnet: Local \
                        }, \
                    max_corrupt_dealers: 1, \
                    dealers: NiDkgDealers { dealers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                    max_corrupt_receivers: 1, \
                    receivers: NiDkgReceivers { receivers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                    threshold: NiDkgThreshold { threshold: 2 }, \
                    registry_version: 1, \
                    resharing_transcript: Some(NiDkgTranscript { \
                        dkg_id: NiDkgId { \
                            start_block_height: 2, \
                            dealer_subnet: fbysm-3acaa-aaaaa-aaaap-yai, \
                            dkg_tag: HighThreshold, \
                            target_subnet: Local \
                            }, \
                        threshold: NiDkgThreshold { threshold: 2 }, \
                        committee: NiDkgReceivers { receivers: {3jo2y-lqbaa-aaaaa-aaaap-2ai, gfvbo-licaa-aaaaa-aaaap-2ai, 32uhy-eydaa-aaaaa-aaaap-2ai}, count: 3 }, \
                        registry_version: 2, \
                        internal_csp_transcript: Groth20_Bls12_381(Transcript { public_coefficients: PublicCoefficientsBytes { coefficients: [0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000] }, receiver_data: {} }) }) \
                        }"
    );
}
fn should_correctly_format_config_display_message ( ) { let config = NiDkgConfig :: new ( valid_dkg_config_data ( ) ) ; let display_text = format ! ( " " config unwrap ( ) ) ; assert_eq ! ( display_text " \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 \
 " ) ; }
This is explicitly tested since this appears in debug log messages.
This is explicitly tested since this appears in debug log messages .