Skip to content

Commit

Permalink
Apply bip327: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
azuchi committed Nov 18, 2024
1 parent ca94842 commit 118ef41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/fixtures/sig_agg_vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
],
"error": {
"type": "invalid_contribution",
"signer": 1
"signer": 1,
"contrib": "psig"
},
"comment": "Partial signature is invalid because it exceeds group size"
}
Expand Down
3 changes: 3 additions & 0 deletions spec/schnorr/musig2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
# The aggregate of the first three elements of pnonce is at index 0
agg_nonce = described_class.aggregate_nonce(pub_nonces[0..2])
expect(agg_nonce).to eq(agg_nonces[0].downcase)
# The aggregate of the first and fourth elements of pnonce is at index 1,
# which is the infinity point encoded as a zeroed 33-byte array
expect(agg_nonces[1].downcase).to eq(described_class.aggregate_nonce([pub_nonces[0], pub_nonces[3]]))

vector['valid_test_cases'].each do |test|
target_pubkeys = test['key_indices'].map {|i| pubkeys[i] }
Expand Down

0 comments on commit 118ef41

Please sign in to comment.