mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
Fix Taproot keyspend serialization (#4443)
This commit is contained in:
parent
93302fea01
commit
5f93096c5a
1 changed files with 6 additions and 1 deletions
|
@ -237,7 +237,12 @@ case class TaprootKeyPath(
|
|||
hashType: HashType,
|
||||
annexOpt: Option[ByteVector])
|
||||
extends TaprootWitness {
|
||||
override val stack: Vector[ByteVector] = Vector(signature.bytes)
|
||||
|
||||
override val stack: Vector[ByteVector] = {
|
||||
if (hashType == HashType.sigHashDefault) {
|
||||
Vector(signature.bytes)
|
||||
} else Vector(signature.bytes :+ hashType.byte)
|
||||
}
|
||||
}
|
||||
|
||||
object TaprootKeyPath {
|
||||
|
|
Loading…
Add table
Reference in a new issue