Skip to content

Commit 288c541

Browse files
authored
fixup! Add API methods to spend funds sent to taproot channel addresses (#3220) (#3228)
1 parent 53747cc commit 288c541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/SpendFromChannelAddress.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait SpendFromChannelAddress {
3131
Right(pubKeyScript) = addressToPublicKeyScript(appKit.nodeParams.chainHash, address).map(Script.write)
3232
channelKeys = appKit.nodeParams.channelKeyManager.channelKeys(ChannelConfig.standard, fundingKeyPath)
3333
localFundingPubkey = channelKeys.fundingKey(fundingTxIndex).publicKey
34-
isTaproot = Script.isPay2tr(Script.parse(pubKeyScript))
34+
isTaproot = Script.isPay2tr(Script.parse(inputTx.txOut(outPoint.index.toInt).publicKeyScript))
3535
(localNonce_opt, dummyWitness) = if (isTaproot) {
3636
val serverNonce = Musig2.generateNonce(randomBytes32(), Right(localFundingPubkey), Seq(localFundingPubkey), None, None)
3737
nonces.put(serverNonce.publicNonce, serverNonce)

0 commit comments

Comments
 (0)