@@ -31,6 +31,7 @@ class Musig2TestsCommon {
3131 KeyAggCache .create(keyIndices.map { pubkeys[it] })
3232 }
3333 }
34+
3435 else -> {
3536 // The tweak cannot be applied, it would result in an invalid public key.
3637 val (_, cache) = KeyAggCache .create(keyIndices.map { pubkeys[it] })
@@ -103,10 +104,6 @@ class Musig2TestsCommon {
103104 val nonce = SecretNonce .generateWithCounter(1UL , privateKey, null , null , null )
104105 assertEquals(ByteVector .fromHex(" 0340A08273BBC9ED0A2BFBDBDAFCCB43073865643593988841F67E665864767047037844A24EC0B763CE73F8252445DDDDFB7CD10498D796AD7217B841882A3A9961" ), nonce.second.data)
105106 }
106- run {
107- val nonce = SecretNonce .generateWithCounter(1UL , privateKey, null , null , null )
108- assertEquals(ByteVector .fromHex(" 0340A08273BBC9ED0A2BFBDBDAFCCB43073865643593988841F67E665864767047037844A24EC0B763CE73F8252445DDDDFB7CD10498D796AD7217B841882A3A9961" ), nonce.second.data)
109- }
110107 }
111108
112109 @Test
@@ -375,7 +372,7 @@ class Musig2TestsCommon {
375372 assertFalse(Musig2 .verify(aliceSig, aliceNonce.second, alicePubKey, spendingTx, 0 , listOf (tx.txOut[0 ]), listOf (alicePubKey, bobPubKey), listOf (aliceNonce.second, aliceNonce.second), scriptTree = null ))
376373
377374 // wrong inputs
378- assertFalse(Musig2 .verify(aliceSig, aliceNonce.second, alicePubKey, spendingTx, 0 , listOf (tx.txOut[0 ], tx.txOut[0 ]), listOf (alicePubKey, bobPubKey), listOf (aliceNonce.second, aliceNonce.second) , scriptTree = null ))
375+ assertFalse(Musig2 .verify(aliceSig, aliceNonce.second, alicePubKey, spendingTx, 0 , listOf (tx.txOut[0 ], tx.txOut[0 ]), listOf (alicePubKey, bobPubKey), publicNonces , scriptTree = null ))
379376 }
380377
381378 @Test
0 commit comments