btcwallet: support p2tr input info type detection

This commit is contained in:
Oliver Gugger 2022-05-10 18:03:29 +02:00
parent 8980471d57
commit 631b2af818
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -41,6 +41,8 @@ func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*lnwallet.Utxo, erro
addressType = lnwallet.WitnessPubKey
case txscript.IsPayToScriptHash(txOut.PkScript):
addressType = lnwallet.NestedWitnessPubKey
case txscript.IsPayToTaproot(txOut.PkScript):
addressType = lnwallet.TaprootPubkey
}
return &lnwallet.Utxo{