Skip to content

test(dkg): add comprehensive tests for DkgConfig type#66

Closed
refcell wants to merge 1 commit intomainfrom
impl-beta/add-dkg-config-tests
Closed

test(dkg): add comprehensive tests for DkgConfig type#66
refcell wants to merge 1 commit intomainfrom
impl-beta/add-dkg-config-tests

Conversation

@refcell
Copy link
Owner

@refcell refcell commented Feb 1, 2026

Summary

Add comprehensive unit tests for the DkgConfig type in the dkg crate.

Changes

  • crates/node/dkg/src/config.rs: Added 13 new unit tests covering:
    • n() method: participant count, single participant, many participants (100)
    • t() method: threshold value, threshold of 1, large threshold (67)
    • my_public_key(): derivation from identity key, consistency across calls, different identities produce different keys
    • Debug implementation verification
    • Clone trait verification
    • Participants vector matches n() return value
    • Threshold boundary case (t == n)

Verification

  • All 13 tests pass
  • Clippy clean
  • Increases test coverage for the DkgConfig configuration type

@refcell
Copy link
Owner Author

refcell commented Feb 1, 2026

Duplicate of #65 which was already merged

@refcell refcell closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant