File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ class MuSigPublicKeys {
1010
1111 late final OpaqueMuSigCache _aggCache;
1212
13- MuSigPublicKeys ._(this .pubKeys, this .aggregate, this ._aggCache);
13+ MuSigPublicKeys ._(Set <ECPublicKey > pubKeys, this .aggregate, this ._aggCache)
14+ : pubKeys = Set .unmodifiable (pubKeys);
1415
1516 factory MuSigPublicKeys (Set <ECPublicKey > pubKeys) {
1617
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ void main() {
2121 () => expect (() => MuSigPublicKeys ({}), throwsArgumentError),
2222 );
2323
24+ test ("pubKeys is immutable" , () {
25+ final keySet = getMuSigKeys ().pubKeys;
26+ expect (() => keySet.remove (keySet.first), throwsA (anything));
27+ });
28+
2429 test ("aggregation works regardless of format" , () {
2530
2631 final compressed = getMuSigKeys (true ).aggregate;
You can’t perform that action at this time.
0 commit comments